box.h File Reference Detailed Description
Macro Definition Documentation
One of the possible results of reducing a box. The box includes no solution. Definition at line 25 of file box.h. Referenced by AddEquation2Simplex(), Box2Buffer(), Buffer2Box(), CropEquation(), CropLinearConstraint(), IncrementalSampleCuikSystemInBox(), MaxReduction(), MaxWorldReduction(), PostProcessBox(), ReduceBox(), ReduceBoxEquationWise(), ReduceRange(), RegenerateSolution(), SampleCuikSystemInBox(), and SimplexSolve().
One of the possible results of reducing a box. The simplex process trigered and error. Definition at line 32 of file box.h. Referenced by Box2Buffer(), Buffer2Box(), MPI_SolveCuikSystem(), PostProcessBox(), ReduceBox(), ReduceRange(), and SimplexSolve().
One of the possible results of reducing a box. The box reduced. Definition at line 38 of file box.h. Referenced by Box2Buffer(), Buffer2Box(), CropEquation(), CropLinearConstraint(), MPI_SolveCuikSystem(), ReduceBox(), ReduceBoxEquationWise(), ReduceRange(), and SimplexSolve().
One of the possible results of reducing a box. The range that we are trying to reduce can not be bounded. Definition at line 45 of file box.h. Referenced by ReduceRange(), and SimplexSolve().
One of the possible results of reducing a box. The box reduced and is validated to include a solution. Definition at line 52 of file box.h. Referenced by Box2Buffer(), Buffer2Box(), PostProcessBox(), ReduceBox(), and SolveCuikSystem().
One of the possible results of reducing a box. The box did not significatively reduced. Definition at line 59 of file box.h. Referenced by CropEquation(), and CropLinearConstraint().
Function DocumentationCreates a new box with the given parameters.
Definition at line 23 of file box.c. References Tbox::is, Tbox::level, Tbox::n, NEW, and NewInterval(). Referenced by BoxFromVariables(), CSRemoveLCVars(), DefinePolytope(), ListOfBoxesBB(), main(), MPI_SolveCuikSystem(), MPI_TreatBox(), NewtonInWorld(), ReadBox(), RegenerateSolution(), and SolveCuikSystem().
Creates a new box with punctual intervals from a given vector.
Definition at line 43 of file box.c. References Tbox::is, Tbox::level, Tbox::n, NEW, and NewInterval(). Referenced by AdjustBioWorldGeometry(), CuikNewtonInBox(), CutPolytopeWithFace(), DetectLinksAndJointsFromResidues(), RegenerateSolutionPoint(), SaveSamplesInt(), and WorldDOF2Sol().
Enlarges all the intervals of the box by substracting/adding a given value to their lower/upper limits.
Definition at line 59 of file box.c. References EnlargeInterval(), Tbox::is, and Tbox::n.
Expands a box so that it includes a given point.
Definition at line 67 of file box.c. References ExpandInterval(), Tbox::is, and Tbox::n. Referenced by CutPolytopeWithFace(), and DetectLinksAndJointsFromResidues().
In a multiprocessors system, the master and the slave processors exchange boxes and they do so by converting boxes into arrays of doubles. This function returns the number of doubles that takes a box when converted to into doubles. Typically, in the array of doubles we store some heading information plus the lower and upper limits for each one of the intervals in the box.
Definition at line 76 of file box.c. References Tbox::n. Referenced by MPI_SolveCuikSystem(), and MPI_TreatBox().
Packs a box into an array of doubles and adds some heading information to the array.
Definition at line 81 of file box.c. References EMPTY_BOX, Error(), ERROR_IN_PROCESS, Tbox::is, Tbox::level, LowerLimit(), Tbox::n, REDUCED_BOX, REDUCED_BOX_WITH_SOLUTION, and UpperLimit(). Referenced by MPI_SolveCuikSystem(), and MPI_TreatBox().
Converts an array of doubles into a box. This is not a box constructor. The box is to be initialized before calling this function and if the box size and the buffer size do not match this function will trigger an error. The idea is to convert a box into a buffer, send it to slave processor, and then update the box with the information sent by the slave.
Definition at line 122 of file box.c. References EMPTY_BOX, Error(), ERROR_IN_PROCESS, Tbox::is, Tbox::level, Tbox::n, NewInterval(), REDUCED_BOX, and REDUCED_BOX_WITH_SOLUTION. Referenced by MPI_SolveCuikSystem(), and MPI_TreatBox().
Copies one box into another. This is a copy constructor and, therefore, the output box is initialized inside the CopyBox (i.e., there is no need to init the box beforehand).
Definition at line 160 of file box.c. References NEW. Referenced by ConcatListOfBoxes(), CopyListOfBoxes(), CopyPolytope(), CropEquation(), CuikNewtonInBox(), Heap2List(), IncrementalSampleCuikSystemInBox(), InitHeapOfBoxes(), ListOfBoxesBB(), ListOfBoxesCluster(), main(), MergeBoxes(), NewCP(), PostProcessBox(), ReduceBox(), ReduceBoxEquationWise(), ReverseListOfBoxes(), SampleCuikSystemInBox(), and SetPolytopeBB(). Defines a box as a concatenation of two boxes.
Definition at line 171 of file box.c. References CopyBox(), DeleteBox(), Tbox::is, Tbox::level, MEM_EXPAND, Tbox::n, and NEW. Referenced by main().
This is a constructor that builds a box form a subset of intervals of a given box.
Definition at line 210 of file box.c. References CopyInterval(), and NEW. Replaces the ranges selected by the flags used of box by the ranges in box bset. Box bset only need to have as many ranges as flags to TRUE in used but the array of flags need as many entries as elements in b.
Definition at line 238 of file box.c. References CopyInterval(), Tbox::is, and Tbox::n. Referenced by CuikNewtonInBox(). Replaces a particular interval in a box by the given one.
Definition at line 259 of file box.c. References CopyInterval(), Error(), and Tbox::is. Referenced by BoxFromVariables(), CSRemoveLCVars(), CuikNewtonInBox(), DefinePolytope(), IncrementalSampleCuikSystemInBox(), main(), NewtonInWorld(), RegenerateJointBox(), RegenerateLinkBoxLinks(), RegenerateLinkBoxQLinks(), RegenerateSolution(), and UpdateOriginalFromSimple(). The intersection of two boxes is a box (possibly empty). This function computes the intersection of two given boxes, along a sub-set of its intervals.
Definition at line 293 of file box.c. References Error(), Intersection(), Tbox::is, Tbox::n, and TRUE. Referenced by ListOfBoxesCluster(). The union of two boxes is a box. This function computes the union of two given boxes, along a sub-set of its intervals.
Definition at line 314 of file box.c. References Error(), Tbox::is, Tbox::n, and Union(). Referenced by ListOfBoxesBB(), and ListOfBoxesCluster(). Checks if a point (defined by an array of n doubles) is included in a box.
Definition at line 332 of file box.c. References Error(), Tbox::is, IsInside(), Tbox::n, and TRUE. Referenced by CuikNewtonInBox(), and InitWorldFromMolecule().
Checks if a point (defined by an array of n doubles) is included in a box taking into accont the topology of each variable. If the point can be made to enter the box by adjusting the angular variables (adding/substracting 2*pi), the given point (v) is modified and at the end of the function it contains the values tha make the point to be inside the box.
Definition at line 350 of file box.c. References ANGLE_ACCURACY, Error(), FALSE, Tbox::is, IsInside(), LowerLimit(), M_2PI, M_PI, Tbox::n, NEW, PI2PI, TOPOLOGY_R, TRUE, and UpperLimit(). Referenced by AddBranchToRRT(), AtlasRRT(), AtlasRRTstar(), AtlasTRRT(), cBiRRT(), ccRRT(), ccTRRT(), ConnectSamples(), ConnectSamplesChart(), ExtendAtlasFromPoint(), GradientSmooth(), InitChartInt(), InitRRT(), main(), NewChartFromPoint(), NewTemptativeSample(), and RRTstar().
For a point aut of the box, we determine the dimension for which the point is out of the box. We assume that the point is out of the box only in one of the dimensions. This is typically the case when tracing rays from inside the box to out of the box, where the point out of the box is acurately located via dichotomics search.
Definition at line 421 of file box.c. References ANGLE_ACCURACY, Tbox::is, LowerLimit(), M_2PI, M_PI, NO_UINT, PI2PI, TOPOLOGY_R, and UpperLimit(). Checks if a point (defined by an array of doubles) is included in a (sub-)box. The (sub-)box is selected using an array of flags.
Definition at line 521 of file box.c. References GetVectorElement(), Tbox::is, IsInside(), and TRUE. Computes the distance from a point to the center of a (sub-)box. The (sub-)box is selected using an array of flags.
Definition at line 542 of file box.c. References GetVectorElement(), IntervalCenter(), Tbox::is, and Tbox::n. Returns TRUE if the input box is (amost) punctual along the selected dimensions. A punctual interval is an interval whose size is below epsilon.
Definition at line 566 of file box.c. References IntervalSize(), Tbox::is, and TRUE. Returns TRUE if the the first box is fully included in the second box.
Definition at line 586 of file box.c. References IntervalInclusion(), Tbox::is, and Tbox::n. Referenced by ReduceBox(). Returns a pointer to the n interval of the box.
Definition at line 270 of file box.c. References Error(), and Tbox::is. Referenced by CSRemoveVarsWithCtRange(), CuikNewtonInBox(), ErrorInInequalities(), ErrorInSolution(), EvaluateEqMin(), GetSCpSystem(), IncrementalSampleCuikSystemInBox(), InitBTree(), InitRRT(), InitSampleFromBox(), IsSimplificable(), LoadRRT(), main(), MoveWorld(), NewCP(), NewtonInWorld(), PointInSystemBox(), PrintWorldAxes(), ReduceBox(), ReduceBoxEquationWise(), ReduceRange(), RegenerateJointBox(), RegenerateLinkBoxQLinks(), RegenerateSolutionPoint(), SampleCuikSystemInBox(), SimpleFromOriginal(), SimplexGetOptimalValue(), SimplifyCuikSystem(), UpdateOriginalFromSimple(), and VariablesFromBox(). Returns a pointer to the intervals defining the box. This allows fast access to the whole set of intervals of the box, i.e., we do not have to access them one at a time.
Definition at line 284 of file box.c. References Tbox::is. Referenced by AddEquation2Simplex(), ComputeSplitDimInt(), CropEquation(), CropLinearConstraint(), EvaluateEqMin(), GetFirstOrderApproximationToEquation(), LinearizeBilinealMonomialEquation(), LinearizeCircleEquation(), LinearizeGeneralEquation(), LinearizeGeneralEquationInt(), LinearizeParabolaEquation(), LinearizeSaddleEquation(), LinearizeSphereEquation(), RegenerateLinkBoxLinks(), SetSimplexBounds(), UpdateOriginalFromSimple(), and UpdateSplitWeight(). Determines the largest box side, among the sub-set of intervals selected via the array of booleans used.
Definition at line 607 of file box.c. References GetBoxMaxDim(), IntervalSize(), Tbox::is, and Tbox::n. Referenced by HeapOfBoxesMaxSize(), ListOfBoxesMaxSize(), MaxReduction(), MaxWorldReduction(), MPI_SolveCuikSystem(), PostProcessBox(), ReduceBox(), ReduceBoxEquationWise(), and SolveCuikSystem().
Determines the largest box side, among the sub-set of variables included in the variable set vars.
Definition at line 615 of file box.c. References GetVariableN(), IntervalSize(), Tbox::is, and VariableSetSize(). Referenced by GetFirstOrderApproximationToEquation(), and LinearizeGeneralEquationInt().
Determines the smallest box side, among the sub-set of variables included in the variable set vars.
Definition at line 633 of file box.c. References GetVariableN(), IntervalSize(), Tbox::is, and VariableSetSize(). Referenced by AddEquation2Simplex(). Determines the diagonal of a sub-box of b determined using the array used.
Definition at line 654 of file box.c. References IntervalSize(), Tbox::is, and Tbox::n. Referenced by HeapOfBoxesMaxDiagonal(), InitWorldFromMolecule(), ListOfBoxesMaxDiagonal(), and PostProcessBox().
Returns the box level, i.e., the number of bisections form the first box used to cretate this box.
Definition at line 676 of file box.c. References Tbox::level. Referenced by MaxWorldReduction(), MPI_SolveCuikSystem(), PostProcessBox(), and SolveCuikSystem(). Computes a random point along the selected dimensions.
Definition at line 682 of file box.c. References Tbox::is, Tbox::n, and randomInInterval(). Referenced by RandomPointInPolytope(), and RRTSample(). Computes the box center along the selected dimensions.
Definition at line 697 of file box.c. References IntervalCenter(), Tbox::is, and Tbox::n. Referenced by LoadSamples(), main(), and MoveWorld(). Determines the distance between the cener of two (sub-)boxes determined using the array used.
Definition at line 715 of file box.c. References Error(), IntervalCenter(), Tbox::is, and Tbox::n.
Computes the square of the minimum distance from a point to a box.
Definition at line 738 of file box.c. References DistanceToInterval(), Tbox::is, and Tbox::n. Referenced by DistancePointToBox().
Computes the minimum distance from a point to a box.
Definition at line 753 of file box.c. References INF, and SquaredDistancePointToBox().
Squared distance of a value to the interval defining a box along a given dimension.
Definition at line 758 of file box.c. References ANGLE_ACCURACY, Tbox::is, LowerLimit(), M_2PI, M_PI, PI2PI, TOPOLOGY_R, and UpperLimit().
Computes the minimum squared distance from a point to a box but considering a possible special topology for the input box and the input point.
Definition at line 833 of file box.c. References ANGLE_ACCURACY, Tbox::is, LowerLimit(), M_2PI, M_PI, Tbox::n, PI2PI, TOPOLOGY_R, and UpperLimit(). Referenced by DistancePointToBoxTopology().
Computes the minimum distance from a point to a box but considering a possible special topology for the input box and the input point.
Definition at line 947 of file box.c. References INF, and SquaredDistancePointToBoxTopology(). Referenced by CutPolytopeWithFace(). Determines the volume of a box (i.e., the product of the box sides), for a sub-set of intervals selected via the array of booleans used.
Definition at line 956 of file box.c. References IntervalSize(), Tbox::is, and Tbox::n. Referenced by HeapOfBoxesVolume(), ListOfBoxesVolume(), MPI_SolveCuikSystem(), PolytopeMaxVolume(), PostProcessBox(), ReduceBox(), ReduceBoxEquationWise(), and SolveCuikSystem(). Determines the sum of the sides of the box, for a sub-set of intervals selected via the array of booleans used. This function is used to determine if a box shrinks in any of its sides and it provides information even if the box is 0-size along any of its dimensions, while GetBoxVolume does not. Intuitively, GetBoxVolume corresponds to the determinant and GetBoxSumSide to the trace of a matrix. They provide different norms useful for different purposes.
Definition at line 974 of file box.c. References IntervalSize(), Tbox::is, and Tbox::n. Referenced by IncrementalSampleCuikSystemInBox().
Returns the box dimensionality, i.e., the number of intervals defining the box.
Definition at line 992 of file box.c. References Tbox::n. Referenced by AnimateWorld(), CropEquation(), CuikNewtonInBox(), ErrorInInequalities(), ErrorInSolution(), GetFirstOrderApproximationToEquation(), InitAtlasRRT(), InitBTree(), InitRRT(), InitSampleFromBox(), LinearizeBilinealMonomialEquation(), LinearizeCircleEquation(), LinearizeGeneralEquation(), LinearizeParabolaEquation(), LinearizeSaddleEquation(), LinearizeSphereEquation(), LoadCSState(), LoadRRT(), LoadSamples(), main(), MoveWorld(), PointInSystemBox(), SetSimplexBounds(), and UpdateSplitWeight(). Returns dimension of the (sub-)box along which the box has maximum size.
Definition at line 1000 of file box.c. References IntervalSize(), Tbox::is, Tbox::n, and NO_UINT. Referenced by GetBoxSize(), and GetBoxSplitDim(). Computes the box dimension for which it is better to split the box. Right now this function is an alias to GetBoxMaxDim.
Definition at line 1030 of file box.c. References GetBoxMaxDim(). Splits a given box in two sub-boxes. This can be seen as a constructor method, that is, the two sub-boxes are created (or initilized) inside this function.
Definition at line 1040 of file box.c. References Error(), Tbox::is, Tbox::level, LowerLimit(), Tbox::n, NEW, NewInterval(), PointInInterval(), and UpperLimit(). Referenced by PostProcessBox().
Scales a box for all its dimensions with the given scale factor.
Definition at line 1085 of file box.c. References IntervalScale(), Tbox::is, and Tbox::n.
Adds a margin to all dimensions of a box.
Definition at line 1093 of file box.c. References Tbox::is, LowerLimit(), Tbox::n, NewInterval(), and UpperLimit().
Returns TRUE if box b1 is to be explored first in depth first. This is to be used as a LessThan operator in a heap of boxes.
Definition at line 1105 of file box.c. Referenced by MPI_SolveCuikSystem(), and SolveCuikSystem().
Returns TRUE if box b1 is to be explored first in breadth first. This is to be used as a LessThan operator in a heap of boxes.
Definition at line 1110 of file box.c. Referenced by MPI_SolveCuikSystem(), and SolveCuikSystem().
Writes a box in file f, that can be stdout. The ouput is of the form {n [l1,u1]...[ln,un]} where n is the dimensionality of the box and [lx,ux] are the intervals defining the box.
Definition at line 1118 of file box.c. References Tbox::is, Tbox::n, and PrintInterval(). Referenced by IncrementalSampleCuikSystemInBox(), main(), MPI_SolveCuikSystem(), MPI_TreatBox(), NewtonInWorld(), PostProcessBox(), ReduceBox(), ReduceBoxEquationWise(), SampleCuikSystemInBox(), SavePolytope(), SaveSamplesInt(), and SolveCuikSystem(). Writes a box in file f, that can be stdout. The ouput is of the form {n v1:[l1,u1]...vn:[ln,un]} where n is the dimensionality of the box vx is the name of the variable for dimension x and [lx,ux] is the corresponding interval. The variable names are only printed if vars is not NULL.
Definition at line 1138 of file box.c. References Tbox::is, Tbox::n, PRINT_VARIABLE_NAME, and PrintInterval(). Referenced by AdjustBioWorldGeometry(), IncrementalSampleCuikSystemInBox(), main(), on_cuikmove_save(), PostProcessBox(), PrintHeapOfBoxes(), and PrintListOfBoxes().
Read a box from file f. The format of the boxes in the file is the same as that printed by PrintBox or PrintBoxSubset.
Definition at line 1172 of file box.c. References Error(), InitBox(), NEW, and NewInterval(). Referenced by LoadPolytope(), main(), and ReadListOfBoxes().
Writes a box in file f in binary format.
Definition at line 1234 of file box.c. References Tbox::is, Tbox::level, and Tbox::n. Referenced by SaveListOfBoxes().
Reads a box from file f in binary format.
Definition at line 1242 of file box.c. References Tbox::is, Tbox::level, Tbox::n, and NEW. Referenced by LoadListOfBoxes().
Deletes a previously generated box (either via InitBox, ReadBox, CopyBox,...).
Definition at line 1259 of file box.c. Referenced by AdjustBioWorldGeometry(), ComputeSplitDim(), CropEquation(), CSRemoveLCVars(), CuikNewton(), CuikNewtonInBox(), CutPolytopeWithFace(), DeleteAtlas(), DeleteAtlasRRT(), DeleteBioWorld(), DeleteCP(), DeleteListOfBoxes(), DeletePolytope(), DeleteRRT(), GetSolutionPointFromLinkTransforms(), GradientSmooth(), IncrementalSampleCuikSystem(), IncrementalSampleCuikSystemInBox(), InitHeapOfBoxes(), ListOfBoxesCluster(), main(), MaxReduction(), MergeBoxes(), MoveWorldDOF(), MPI_SolveCuikSystem(), MPI_TreatBox(), NewtonInWorld(), on_cuikmove_save(), PostProcessBox(), RandomSmooth(), ReduceBox(), ReduceBoxEquationWise(), RegenerateSolution(), RegenerateSolutionPoint(), SampleCuikSystem(), SampleCuikSystemInBox(), SaveSamplesInt(), SetPolytopeBB(), ShortcutSmooth(), SimplifyCuikSystem(), SolveCuikSystem(), and WorldErrorFromDOFs(). |
Follow us!