Implementation of functions to deal with Tparameters.
- See also
- Tparameters, parameters.h.
Definition in file parameters.c.
|
boolean | ReadParameters (char *file, Tparameters *p) |
| Reads a parameter set from a file. More...
|
|
void | InitParameters (Tparameters *p) |
| Constructor. More...
|
|
void | InitParametersFromFile (char *file, Tparameters *p) |
| Constructor from a file. More...
|
|
double | GetParameter (unsigned int n, Tparameters *p) |
| Gets the value for a particular parameter. More...
|
|
unsigned int | GetParameterID (char *name, Tparameters *p) |
| Returns the parameter identifier given the paramete name. More...
|
|
boolean | ParameterSet (unsigned int n, Tparameters *p) |
| Checks if a parameter is already defined. More...
|
|
void | SetParameter (unsigned int n, char *name, double v, Tparameters *p) |
| Sets the name and value for a particular parameter. More...
|
|
void | ChangeParameter (unsigned int n, double v, Tparameters *p) |
| Sets the value for a particular parameter. More...
|
|
void | PrintParameters (FILE *f, Tparameters *p) |
| Prints a parameter set. More...
|
|
void | DeleteParameters (Tparameters *p) |
| Destructor. More...
|
|
◆ ReadParameters()
Reads a parameter set from a file.
- Parameters
-
file | The name of the file. |
p | The parameter set to update. |
- Returns
- TRUE if the the file with the parameter exists.
Referenced by InitParametersFromFile().
◆ InitParameters()
◆ InitParametersFromFile()
void InitParametersFromFile |
( |
char * |
file, |
|
|
Tparameters * |
p |
|
) |
| |
Defines an set of parameters from a file. It first read the default set of parameters and then the given set of parameters.
- Parameters
-
file | Name of the file with the set of parameters particular for the problem at hand. |
p | Set of parameters to define. |
- See also
- ReadParameters, defines.h
Definition at line 51 of file parameters.c.
References CreateFileName(), DEFAULT_PARAMS, DeleteFileName(), Error(), GetFileFullName(), InitParameters(), NPARAMETERS, PARAM_EXT, ReadParameters(), and Warning().
Referenced by main().
◆ GetParameter()
double GetParameter |
( |
unsigned int |
n, |
|
|
Tparameters * |
p |
|
) |
| |
Gets the value for a particular parameter.
- Parameters
-
n | Number of parameter. |
p | Set of parameters. |
- Returns
- The value of the parameter. If there is no parameter with the given number this functions triggers an error.
Definition at line 101 of file parameters.c.
References Error(), and NPARAMETERS.
Referenced by AddBranchToAtlasDynamicRRT(), AddBranchToAtlasRRT(), AddBranchToRRT(), AddNodeToRRT(), AddStepToAtlasRRTstar(), AddStepToRRTstar(), AddTrustedChart2Atlas(), AddVelocityEquations(), ApplyLinkRot(), ApplyLinkRotVar(), ApproachState(), AtlasAStar(), AtlasBiRRTstar(), AtlasGBF(), AtlasRRT(), AtlasRRTSimulate(), AtlasRRTstar(), AtlasTRRT(), BiRRTstar(), BuildAtlasFromPoint(), cBiRRT(), ccRRT(), ccTRRT(), Chart2Manifold(), ClassifyPointInChart(), CombineGradients(), ComputeAcceleration(), ComputeHandC_FJH(), ComputeInverseDynamics(), ComputeSplitDimInt(), ConnectDynamicStates(), ConnectDynamicStatesID(), ConnectSamples(), ConnectSamplesChart(), CSRemoveLCVars(), CSRemoveUnusedVars(), CSRemoveVarsWithCtRange(), CuikGradientInBox(), CuikNewtonInBox(), CuikNewtonSimp(), DealWithCP(), DetermineChartNeighbours(), DistanceOnChart(), DummifyAndAddEquation(), ExtendAtlasFromPoint(), ExtendAtlasTowardPoint(), FindSingularPoint(), FixLinks(), FixLinkZToZero(), FixZToZero(), GenerateEquationsFromBranch(), GenerateForceEquilibriumEquations(), GenerateJointEquations(), GenerateJointEquationsInBranch(), GenerateJointRangeEquations(), GenerateJointRangeSingularityEquations(), GenerateJointSolution(), GenerateLinkConf(), GenerateLinkRot(), GenerateLinkSolution(), GenerateTransEquationsFromBranch(), GenerateWorldEquations(), GenerateWorldSingularityEquations(), GeodesicDistance(), GetChartDegree(), GetJointTransSeq(), GetLinkPoseSimpVars(), GetLinkTransformsFromSolution(), GetLinkTransformsFromSolutionPoint(), GetSCpSystem(), GetSolutionPointFromLinkTransforms(), GetTransform2Link(), GradientSmooth(), IncrementalSampleCuikSystemInBox(), InitAtlasFromPoint(), InitAtlasRRT(), InitBranchState(), InitChartInt(), InitDynamicSpace(), InitHandC(), InitRRT(), InitWorldCD(), InitWorldFromMolecule(), InitWorldKinCS(), kinobiRRT(), kinoEST(), kinoRRT(), LinearizeDynamics(), LQRComputePolicy(), LQRComputePolicy_t(), main(), ManifoldDimension(), MinimizeOnAtlas(), MoveWorld(), MPI_SolveCuikSystem(), NewChartFromPoint(), NewTemptativeSample(), Newton2ManifoldPlane(), NextDynamicState(), NextDynamicStateEuler(), NextDynamicStateLocalEuler(), NextDynamicStateLocalRK4(), NextDynamicStateRK4(), NumericIntegration(), PathEffort(), PathInChart(), PathStart2GoalInRRT(), PlotAtlasRRT(), PlotChart(), PlotChartAsPolygon(), PlotForceField(), PlotRRT(), PlotSamples(), PointOnChart(), Polytope2SPolytope(), PopulateWithSamples(), PostProcessBox(), PrintAtlasStatistics(), PrintCuikSystemWithSimplification(), PrintWorldAxes(), RandomSmooth(), ReadOneSample(), ReadTwoSamples(), RecursiveReWireRRTstar(), ReduceBox(), ReduceBoxEquationWise(), RefineSingularPoint(), RefineTrajectory(), RegenerateJointBox(), RegenerateJointSolution(), RegenerateLinkBox(), RegenerateLinkSolution(), RegenerateMechanismBox(), RegenerateSolution(), RegenerateWorldOriginalPoint(), ReWireAtlasRRTstar(), ReWireRRTstar(), RRTstar(), SampleCuikSystemInBox(), ShortcutSmooth(), SimplifyCuikSystem(), Simulate(), SmoothSamples(), SolveCuikSystem(), StepCostNumericalGradient(), StepDispersionGradient(), StepEffort(), StepEffortGradient(), StepLengthGradient(), Steps2PathinAtlasRRT(), Steps2PathinRRT(), Time2Go(), TransitionTestRRT(), TriangulateAtlas(), UpdateCuikSystem(), UpdateLQRPolicy(), WireAtlasRRTstar(), WireRRTstar(), WorldAtomJacobian(), WorldCoupleTensegrityVariable(), WorldDOF2Sol(), WorldForceField(), WorldForceVars(), WorldPotentialEnergy(), WorldSample2DOF(), and WorldSimpKinematicVars().
◆ GetParameterID()
unsigned int GetParameterID |
( |
char * |
name, |
|
|
Tparameters * |
p |
|
) |
| |
Determines the parameter identifier for a given parameter name.
- Parameters
-
name | The paremeter name. |
p | The set of parameteres. |
- Returns
- The paremeter identifier or NO_UINT if there is not a parameter with the given name.
Definition at line 118 of file parameters.c.
References FALSE, NO_UINT, and NPARAMETERS.
◆ ParameterSet()
Determines is a parameter is already defined. The default initialization (the one from the default set of parameters) is not taken into account. Only explicit initializations from the users are considered.
Only parameters alrady defined can be used in the definition of other parameters.
- Parameters
-
n | The identifier of the parameter. |
p | The parameter set. |
- Returns
- TRUE if the parameter is already defined.
Definition at line 139 of file parameters.c.
◆ SetParameter()
void SetParameter |
( |
unsigned int |
n, |
|
|
char * |
name, |
|
|
double |
v, |
|
|
Tparameters * |
p |
|
) |
| |
Sets the name and value for a particular parameter.
- Parameters
-
n | Number of parameter. |
name | The name for the parameter. This is a string that is used when printing the parameter. |
v | The value. |
p | Set of parameters. |
Definition at line 147 of file parameters.c.
References ChangeParameter(), Error(), NPARAMETERS, and Warning().
◆ ChangeParameter()
void ChangeParameter |
( |
unsigned int |
n, |
|
|
double |
v, |
|
|
Tparameters * |
p |
|
) |
| |
Sets the value for a particular parameter.
- Parameters
-
n | Number of parameter. |
v | The new value for the parameter. |
p | Set of parameters. |
Definition at line 172 of file parameters.c.
References Error(), and NPARAMETERS.
Referenced by AddVelocityEquations(), DealWithCP(), IncrementalSampleCuikSystemInBox(), InitAtlasFromPoint(), main(), MinimizeOnAtlas(), PathEffort(), SampleCuikSystemInBox(), SetParameter(), and SmoothSamples().
◆ PrintParameters()
Writes a parameter set to a stream, that can be stdout.
In principle the output of this function can be used as a parameter file (i.e., it can be parsed correctly with InitParametersFromFile).
- Parameters
-
f | The stream |
p | Set of parameters to print. |
Definition at line 189 of file parameters.c.
References AMBIENT_SAMPLING, C_FCL, CT_CD_ENGINE, CT_CUT_X, CT_CUT_Y, CT_CUT_Z, CT_G_AXIS, CT_REPRESENTATION, CT_SAMPLING, CT_SPLIT_TYPE, Error(), FCL, INF, KDTREE_SAMPLING, NOCD, NPARAMETERS, PQP, REP_FLINKS, REP_JOINTS, REP_LINKS, REP_QLINKS, RIGIDCLL, SOLID, TANGENT_SAMPLING, and VCOLLIDE.
Referenced by main().
◆ DeleteParameters()
Deletes a set of parameters and frees the allocated memory.
- Parameters
-
p | Set of parameters to be deleted. |
Definition at line 361 of file parameters.c.
Referenced by main().
|
Follow us!