csmapping.c File Reference Detailed DescriptionImplementation of the functions operating on Tmapping.
Definition in file csmapping.c.
Function Documentation
Generates a trivial mapping between two variable sets. The mapping is defined by checking which variables in one set are also present in the other. We identify variables using their name.
Definition at line 14 of file csmapping.c. References AddTerm2LinearConstraint(), CopyVariables(), GetVariable(), GetVariableID(), GetVariableName(), InitLinearConstraint(), Tmapping::lc, NEW, NO_UINT, NVariables(), Tmapping::orig, Tmapping::original, Tmapping::related, Tmapping::simple, Tmapping::sizeO, and Tmapping::sizeS. Referenced by SimplifyCuikSystem(). Copies one mapping into another.
Definition at line 64 of file csmapping.c. References CopyLinearConstraint(), CopyVariables(), Tmapping::lc, NEW, Tmapping::orig, Tmapping::original, Tmapping::related, Tmapping::simple, Tmapping::sizeO, and Tmapping::sizeS. Referenced by CopyCuikSystem().
Links a variable in the original problem with a variable in the simplified problem via a linear relation
Definition at line 100 of file csmapping.c. References CopyLinearConstraint(), DeleteLinearConstraint(), Error(), Tmapping::lc, Tmapping::related, and TRUE. Referenced by SimplifyCuikSystem().
Returns the linear constraint of variables in the simple set that defines a variable in the original set. The output linear constraint is defined inside this function.
Definition at line 112 of file csmapping.c. References CopyLinearConstraint(), InitLinearConstraint(), Tmapping::lc, and Tmapping::related. Referenced by AddSimplifiedJacobianEquations(), and RewriteEquation2Simp().
Size of the variable set in the original system.
Definition at line 120 of file csmapping.c. References Tmapping::sizeO.
Size of the variable set in the simplified system.
Definition at line 125 of file csmapping.c. References Tmapping::sizeS. Returns TRUE if there is a variable in the simple system with the same name as variable v in the original system.
Definition at line 130 of file csmapping.c. References GetVariable(), GetVariableID(), GetVariableName(), NO_UINT, Tmapping::original, and Tmapping::simple. Referenced by IncrementalSampleCuikSystemInBox().
Gets the numerical identifier in the original set of variables corresponding to a variable in the simplified set (given by its numerical identifier).
Definition at line 135 of file csmapping.c. References NO_UINT, and Tmapping::orig. Referenced by ComputeSplitDim(), and RewriteEquation2Orig(). Applies the mapping to define a box corresponding to the simple system from a box corresponding to the original system. We simply get the sub-set of the original variables used in the simplified one and join them into a box. The box s is create inside this function.
Definition at line 143 of file csmapping.c. References BoxFromVariables(), CopyInterval(), GetBoxInterval(), NO_UINT, Tmapping::orig, Tmapping::simple, and Tmapping::sizeS. Referenced by ComputeSplitDim(), CuikNewtonInBox(), MaxReduction(), MPI_SolveCuikSystem(), SimplifyCuikSystem(), and SolveCuikSystem().
The same as SimpleFromOriginal but operating on points and not on boxes.
Definition at line 165 of file csmapping.c. References NO_UINT, Tmapping::orig, PointFromVariables(), Tmapping::simple, and Tmapping::sizeS. Referenced by GenerateSimplifiedPoint(). Applies the mapping to define a box corresponding to the original system from a box corresponding to the simple system. Variables in the original, not included in the simplification are not changed. Note the difference with SimpleFromOriginal : here the output box o is just updated and not created from scratch.
Definition at line 177 of file csmapping.c. References EvaluateLinearConstraintInt(), GetBoxInterval(), GetBoxIntervals(), GetLinearConstraintError(), Intersection(), IntervalAdd(), IntervalInvert(), Tmapping::lc, Tmapping::related, SetBoxInterval(), and Tmapping::sizeO. Referenced by CuikNewtonInBox(), MaxReduction(), PostProcessBox(), and RegenerateOriginalBox().
The same as UpdateOriginalFromSimple but operating on points instead of on boxes.
Definition at line 199 of file csmapping.c. References EvaluateLinearConstraint(), GetLinearConstraintError(), IntervalCenter(), Tmapping::lc, Tmapping::related, and Tmapping::sizeO. Referenced by RegenerateOriginalPoint().
Prints a the linear relations defining a mapping into a stream, possibly stdout. The mapping is printed in the form
where vo is an original variable and vs is a simplifed one.
Definition at line 218 of file csmapping.c. References FALSE, GetVariableNames(), Tmapping::lc, NEW, Tmapping::original, PRINT_VARIABLE_NAME, PrintLinearConstraint(), Tmapping::related, Tmapping::simple, Tmapping::sizeO, and Tmapping::sizeS. Referenced by PrintCuikSystemWithSimplification().
Loads the mapping information into a file. Note that the variable sets are load from the file and, thus, the mappings build from a file have no access to the variable names (this is used only for pretty printing the mappings).
Definition at line 266 of file csmapping.c. References InitLinearConstraint(), Tmapping::lc, LoadLinearConstraint(), NEW, Tmapping::orig, Tmapping::original, Tmapping::related, Tmapping::simple, Tmapping::sizeO, and Tmapping::sizeS.
Saves the mapping information into a file. Note that the variable sets are not stored in the files. See LoadMapping for more about the consequences of this.
Definition at line 291 of file csmapping.c. References Tmapping::lc, Tmapping::orig, Tmapping::related, SaveLinearConstraint(), Tmapping::sizeO, and Tmapping::sizeS. Referenced by SaveCuikSystemSimplification().
Deletes a mapping.
Definition at line 310 of file csmapping.c. References DeleteLinearConstraint(), DeleteVariables(), Tmapping::lc, Tmapping::orig, Tmapping::original, Tmapping::related, Tmapping::simple, and Tmapping::sizeO. Referenced by UnUpdateCuikSystem(). |
Follow us!