sample.c
Go to the documentation of this file.
29 void InitSampleFromBox(unsigned int sID,boolean *systemVar,Tbox *b,unsigned int boxID,Tsample *s)
Tinterval * GetBoxInterval(unsigned int n, Tbox *b) Returns a pointer to one of the intervals defining the box. Definition: box.c:270 Definition of basic functions. unsigned int VectorSize(Tvector *vector) Gets the number of elements in a vector. Definition: vector.c:169 void * GetVectorElement(unsigned int i, Tvector *vector) Returns a pointer to a vector element. Definition: vector.c:269 double GetSampleValue(unsigned int n, Tsample *s) Gets the value for a given dimension of the sample. Definition: sample.c:79 void InitSample(unsigned int sID, unsigned int n, double *v, unsigned int boxID, Tsample *s) Constructor. Definition: sample.c:16 void InitSampleFromBox(unsigned int sID, boolean *systemVar, Tbox *b, unsigned int boxID, Tsample *s) Constructor. Definition: sample.c:29 unsigned int GetSampleBoxID(Tsample *s) Gets the identifier of the box that includes the sample. Definition: sample.c:91 Definitions of constants and macros used in several parts of the cuik library. void SetSampleBoxID(unsigned int boxID, Tsample *s) Changes the identifier of the box to which the sample is linked. Definition: sample.c:101 void InitVector(unsigned int ele_size, void(*Copy)(void *, void *), void(*Delete)(void *), unsigned int max_ele, Tvector *vector) Constructor. Definition: vector.c:100 void SetVectorElement(unsigned int i, void *e, Tvector *vector) Adds an element to the vector in a given position. Definition: vector.c:234 unsigned int GetSampleDim(Tsample *s) Returns the dimensionality of the space where the sample is defined. Definition: sample.c:69 double GetSampleDistance(Tsample *s1, Tsample *s2) Computes the Euclidean distance between two samples. Definition: sample.c:106 void SaveSample(FILE *f, Tsample *s) Saves the information of the sample in a file. Definition: sample.c:142 Definition of the Tsample type and the associated functions. |
Follow us!