sample.c File Reference Detailed Description
Function Documentation
Initializes a new sample.
Definition at line 16 of file sample.c. References Tsample::boxID, CopyDouble(), DeleteDouble(), InitVector(), SetVectorElement(), Tsample::sID, and Tsample::v. Referenced by InitSampleFromBox().
Initializes a new sample from a box. The values for the sample are taken from the box center for the system variables.
Definition at line 29 of file sample.c. References GetBoxInterval(), GetBoxNIntervals(), InitSample(), IntervalCenter(), and NEW. Referenced by main().
Creates a new sample copying the information from another sample.
Definition at line 62 of file sample.c. References CopyVector().
Returns the dimensionality of the space where the sample is defined, i.e., the dimensionality of the configuration space.
Definition at line 69 of file sample.c. References Tsample::v, and VectorSize(). Referenced by GetSampleDistance(). Gets the values of the sample.
Definition at line 74 of file sample.c. References Tsample::v.
Gets the value for a given dimension of the sample.
Definition at line 79 of file sample.c. References Error(), GetVectorElement(), and Tsample::v. Referenced by GetSampleDistance().
Gets the identifier of the box that includes the sample.
Definition at line 91 of file sample.c. References Tsample::boxID.
Gets the identifier of the sample.
Definition at line 96 of file sample.c. References Tsample::sID.
Changes the identifier of the box to which the sample is linked.
Definition at line 101 of file sample.c. References Tsample::boxID. Computes the Euclidean distance between two samples. This is a lower bound of the distance between the two samples on the configuration space.
Definition at line 106 of file sample.c. References Error(), GetSampleDim(), and GetSampleValue().
Prints the information stored in the sample. Only the values for each one of the system variables is printed. This is in contrast with SaveSample that prints allç the information stored in the sample (values for the variables, identifier, box identifier, etc).
Definition at line 126 of file sample.c. References GetVectorElement(), PrintReal(), Tsample::v, and VectorSize(). Referenced by main(), and SaveSample().
Saves the information of the sample in a file.
Definition at line 142 of file sample.c. References Tsample::boxID, PrintSample(), Tsample::sID, Tsample::v, and VectorSize().
Creates a new sample reading the information from a file.
Definition at line 148 of file sample.c. References Tsample::boxID, CopyDouble(), DeleteDouble(), InitVector(), SetVectorElement(), Tsample::sID, and Tsample::v.
Deletes the information stored in a Tsample and frees the allocated memory.
Definition at line 164 of file sample.c. References DeleteVector(). Referenced by main(). |
Follow us!