vector.c
Go to the documentation of this file.
100 void InitVector(unsigned int ele_size,void (* Copy)(void *,void*),void (* Delete)(void *),unsigned int max_ele,Tvector *vector)
unsigned int NewFreeVectorElement(void *e, Tvector *vector) Adds an element to the vector. Definition: vector.c:227 void MoveVectorElement(unsigned int i, unsigned int ni, Tvector *vector) Moves a vector element from one position to another. Definition: vector.c:363 void * GetLastElement(Tvector *vector) Returns a pointer to the last element of a vector. Definition: vector.c:278 void SwapVectorElements(unsigned int i, unsigned int j, Tvector *vector) Swaps two elements in a vector. Definition: vector.c:299 Definitions of constants and macros used in several parts of the cuik library. boolean ElementInVector(void *e, boolean(*cmp)(void *, void *), Tvector *vector) Search for an element in a vector. Definition: vector.c:188 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 ExtractVectorElement(unsigned int i, void *e, Tvector *vector) Extracts an element from a vector. Definition: vector.c:342 unsigned int VectorFirstFreePos(Tvector *vector) Finds a free position in the vector. Definition: vector.c:162 void SetVectorElement(unsigned int i, void *e, Tvector *vector) Adds an element to the vector in a given position. Definition: vector.c:238 unsigned int NewVectorElement(void *e, Tvector *vector) Adds an element to the vector. Definition: vector.c:216 void ConcatVectors(Tvector *vector1, Tvector *vector) Concatenates two vectors. Definition: vector.c:333 Definition of the Tvector type and the associated functions. unsigned int VectorMaxSize(Tvector *vector) Gets the maximum number of elements in a vector. Definition: vector.c:178 #define MEM_EXPAND(_var, _n, _type) Expands a previously allocated memory space. Definition: defines.h:272 unsigned int FindPos(void *e, boolean(*cmp)(void *, void *), Tvector *vector) Search for an element in a vector. Definition: vector.c:193 boolean CmpDoublePair(void *a, void *b) Comparison operator for paris of doubles. Definition: vector.c:65 void * GetVectorElement(unsigned int i, Tvector *vector) Returns a pointer to a vector element. Definition: vector.c:270 unsigned int VectorSize(Tvector *vector) Gets the number of elements in a vector. Definition: vector.c:173 void RemoveVectorElement(unsigned int i, Tvector *vector) Removes an element from the vector. Definition: vector.c:286 |
Follow us!