A Vector is a one-dimensional array but allows for automatic resizing.i.e,the size need not be known in advance.
|
internal helper function for sorting.
References vectorElement(), vectorSetElement(), and vectorSize(). Referenced by vectorSort(), and vectorSortWithData(). |
|
resize vector, double capacity.
Referenced by vectorAddElement(), vectorInsertElement(), vectorSetElement(), and vectorSetElements(). |
|
adds a new element to the end of the vector. if necessary the vector automatically increases its capacity.
References resizeVector(). Referenced by arrayNew(). |
|
returns the current capacity of vector.
Referenced by vectorClone(). |
|
clones a vector.
References vectorCapacity(), vectorCopy(), and vectorNew(). Referenced by arrayClone(). |
|
checks if a vector contains a given element.
|
|
copies all the entries of one vector src to another vector dst.
Referenced by vectorClone(). |
|
deletes vector, but can't free memory for the content.
Referenced by arrayDelete(), listSort(), and listSortWithData(). |
|
sets the element at a specific index to a new element. if necessary the vector automatically increases its capacity.
Referenced by arrayDimension(), arrayElement(), arraySetElement(), doSorting(), and vectorToList(). |
|
finds the index of an entry in the vector.
Referenced by vectorRemoveElement(). |
|
inserts a new element at the specified index. Size increases automatically if necessary. Inefficient method,Not recommended.
References resizeVector(). |
|
checks if the vector is empty or not.
|
|
creates a new vector with an initial capacity. specifying a correct or nearly correct capacity may slightly improve the efficiency.
Referenced by arrayNew(), listToVector(), and vectorClone(). |
|
removes the specified element from the vector. If the element occurs multiple times, the first item will be removed. If the element does not belong to the vector the program is aborted. Not efficient,not recommended.
References vectorIndexOf(), and vectorRemoveElementAt(). |
|
removes element at the index. all later elements move one position in front and size decreases. inefficient, not recommended.
Referenced by vectorRemoveElement(). |
|
sets all the elements to a new value. Size increases to the current capacity of the vector.
References vectorSetElements(). |
|
sets the element at the given index. size may increase automatically if necessary.
References resizeVector(). Referenced by doSorting(), and listToVector(). |
|
sets all elements between FROM and TO(excluding to) to a new value. size may increase automatically if necessary.
References resizeVector(). Referenced by vectorSetAllElements(). |
|
returns the current number of entries in the vector.
Referenced by arrayDimension(), arrayElement(), arraySetElement(), doSorting(), and vectorToList(). |
|
sorts a vector using a user-specified compare function. The function f is called as f(a,b)
References doSorting(). Referenced by listSort(). |
|
sorts a vector, using a user-specified compare function and some extra data. The function f is called as f(a,b,)and some data.
References doSorting(). Referenced by listSortWithData(). |
|
converts a vector into a list.
References listPrependElement(), vectorElement(), and vectorSize(). Referenced by listSort(), and listSortWithData(). |