box.c
Go to the documentation of this file.
89 buffer[0]=-1.0; /*and in the other direction, the first double is also used to send output messages to the scheduler*/
782 double SquaredDistanceToBoxDimensionTopology(unsigned int dim,double p,unsigned int *tp,Tbox *b)
1099 b1->level=b2->level=b->level+1; /* the boxes resulting from a split are of the next level of the search */
1204 do token=fgetc(f); while ((token!=EOF)&&(token!='{')); /* skip everything till the beginning of the box */
1221 while ((token!=EOF)&&(token!='}')) //while the box is not closed (and there is something in the file)
double SquaredDistancePointToBox(double t, double *p, Tbox *b) Distance from a point to a box. Definition: box.c:762 boolean PointInBox(boolean *used, unsigned int n, double *v, double tol, Tbox *b) Checks if a point is included in a(sub-) box. Definition: box.c:356 void EnlargeInterval(double lo, double uo, Tinterval *i) Symmetrically increases the size of an interval. Definition: interval.c:206 boolean Intersection(Tinterval *i1, Tinterval *i2, Tinterval *i_out) Computes the intersection of two intervals. Definition: interval.c:285 double SquaredDistancePointToBoxTopology(double t2, double *p, unsigned int *tp, Tbox *b) Squared distance from a point to a box. Definition: box.c:857 void Box2Buffer(unsigned int c, unsigned int n, double *buffer, Tbox *b) Converts a box into an array of doubles. Definition: box.c:81 Tinterval * GetBoxInterval(unsigned int n, Tbox *b) Returns a pointer to one of the intervals defining the box. Definition: box.c:270 double DistanceToSubBoxCenter(boolean *used, Tvector *v, Tbox *b) Computes the distance from a point to the center of a (sub-)box. Definition: box.c:566 double DistanceToInterval(double p, Tinterval *i) Distance to an interval. Definition: interval.c:112 void * GetVectorElement(unsigned int i, Tvector *vector) Returns a pointer to a vector element. Definition: vector.c:270 void SetBoxInterval(unsigned int n, Tinterval *is, Tbox *b) Replaces a particular interval in a box. Definition: box.c:259 void CopyBoxSubset(boolean *used, void *b_out, void *b_in) Creates a box from a sub-set of a given box. Definition: box.c:210 unsigned int GetBoxMaxDim(boolean *used, Tbox *b) The dimension of the (sub-)box along which the box has maximum size. Definition: box.c:1024 double GetBoxSumSide(boolean *used, Tbox *b) Computes the sum of the sides of the box. Definition: box.c:998 void EnlargeBox(double lo, double uo, Tbox *b) Enlarges all the intervals of a box. Definition: box.c:59 boolean CmpBoxBreadthFirst(void *b1, void *b2, void *userData) Determines which box to explore first in breadth first mode. Definition: box.c:1134 void SetBoxSubset(boolean *used, Tbox *bset, Tbox *b) Changes a sub-set of ranges in a given box. Definition: box.c:238 unsigned int GetBoxBufferSize(Tbox *b) Returns the size of a box when converted to an array of doubles. Definition: box.c:76 void Crop2Box(boolean *used, unsigned int n, double *p, Tbox *b) Forces a point to be inside a box. Definition: box.c:328 void AddMargin2Box(double m, Tbox *b) Adds a margin to all dimensions of a box. Definition: box.c:1117 void RandomPointInBox(boolean *used, double *c, Tbox *b) Returns the a random point along the selected dimensions. Definition: box.c:706 unsigned int GetVariableN(unsigned int n, Tvariable_set *vs) Gets a variable identifier from a variable set. Definition: variable_set.c:454 Error and warning functions. void ExpandInterval(double v, Tinterval *i) Changes the interval limits to include a given point. Definition: interval.c:236 boolean PointInSubBox(boolean *used, Tvector *v, double tol, Tbox *b) Checks if a point is included in a (sub-)box. Definition: box.c:545 Definition of the Tbox type and the associated functions. Definitions of constants and macros used in several parts of the cuik library. void SplitBox(unsigned int n, double r, Tbox *b1, Tbox *b2, Tbox *b) Splits a box. Definition: box.c:1064 void Buffer2Box(unsigned int *c, unsigned int *n, double *buffer, Tbox *b) Converts a buffer of doubles into a box. Definition: box.c:122 double DistancePointToBoxTopology(double *p, unsigned int *tp, Tbox *b) Distance from a point to a box. Definition: box.c:971 void SetBoxIntervals(Tinterval *is, Tbox *b) Replaces the box intervals with a new set. Definition: box.c:253 double GetBoxDiagonal(boolean *used, Tbox *b) Computes the diagonal of a (sub-)box. Definition: box.c:678 boolean BoxInclusion(boolean *used, Tbox *b1, Tbox *b2) Checks if a (sub-)box is fully included in another box. Definition: box.c:610 double GetBoxCenterDistance(boolean *used, Tbox *b1, Tbox *b2) Computes distance between the center of two (sub-)boxes. Definition: box.c:739 unsigned int VariableSetSize(Tvariable_set *vs) Gets the number of elements of a variable set. Definition: variable_set.c:449 boolean Union(Tinterval *i1, Tinterval *i2, Tinterval *i_out) Computes the union of two intervals. Definition: interval.c:297 #define NO_UINT Used to denote an identifier that has not been initialized. Definition: defines.h:435 void InitBoxFromPoint(unsigned int dim, double *p, Tbox *b) Initializes a box from a point. Definition: box.c:43 void IntervalScale(Tinterval *i1, double e, Tinterval *i_out) Scales an interval. Definition: interval.c:360 #define REDUCED_BOX_WITH_SOLUTION One of the possible results of reducing a box. Definition: box.h:52 double SquaredDistanceToBoxDimensionTopology(unsigned int dim, double p, unsigned int *tp, Tbox *b) Squared distance from a value to a given box dimension. Definition: box.c:782 void BoxUnion(boolean *used, Tbox *b1, Tbox *b2, Tbox *b_out) Computes the box union of two given boxes. Definition: box.c:314 void PrintBoxSubset(FILE *f, boolean *used, char **varNames, Tbox *b) Prints a (sub-)box. Definition: box.c:1162 boolean IsInside(double p, double tol, Tinterval *i) Checks if a value is inside an interval. Definition: interval.c:348 double randomInInterval(Tinterval *t) Returns a random double in the given interval. Definition: random.c:67 Tinterval * GetBoxIntervals(Tbox *b) Returns a pointer to the array of intervals defining the box. Definition: box.c:284 #define MEM_EXPAND(_var, _n, _type) Expands a previously allocated memory space. Definition: defines.h:404 void ExpandBox(double *p, Tbox *b) Expands a box so that it includes a given point. Definition: box.c:67 void GetBoxCenter(boolean *used, double *c, Tbox *b) Returns the box center along the selected dimensions. Definition: box.c:721 boolean CmpBoxDepthFirst(void *b1, void *b2, void *userData) Determines which box to explore first in depth first mode. Definition: box.c:1129 Definition of basic randomization functions. double PointInInterval(double r, Tinterval *i) Gets a point inside the interval. Definition: interval.c:164 boolean IsPunctualBox(boolean *used, double epsilon, Tbox *b) Checks if a (sub-)box is (almost) punctual. Definition: box.c:590 double GetBoxMaxSizeVarSet(Tvariable_set *vars, Tbox *b) Computes the size of the box. Definition: box.c:639 unsigned int GetBoxSplitDim(boolean *used, Tbox *b) Computes the box dimension for which it is better to split the box. Definition: box.c:1054 double GetBoxMinSizeVarSet(Tvariable_set *vars, Tbox *b) Computes the minimum size of the box. Definition: box.c:657 unsigned int OutOfBoxTopology(boolean *used, unsigned int n, double *v, unsigned int *tp, signed int *s, Tbox *b) Determines the violated box limit. Definition: box.c:445 boolean IntervalInclusion(Tinterval *i1, Tinterval *i2) Checks is a given interval is fully included into another interval. Definition: interval.c:262 boolean BoxesIntersection(boolean *used, Tbox *b1, Tbox *b2, Tbox *bout) Computes the box intersection of two given boxes. Definition: box.c:293 boolean PointInBoxTopology(boolean *used, boolean update, unsigned int n, double *v, double tol, unsigned int *tp, Tbox *b) Checks if a point is included in a(sub-) box. Definition: box.c:374 |
Follow us!