*/
/**
- * This is the general indexing used for vector access.
+ * \brief This is the general indexing used for vector access.
+ * \related vector
*/
typedef unsigned long vector_index;
/**
- * A vector_page is an array of void* items. Its size depends on the
- * applicable vector variant: 2^(8-variant)
+ * \brief A vector_page is an array of void* items. Its size depends
+ * on the applicable vector variant.
+ * \related vector
*/
typedef void* vector_page[];
/**
- * A vector is a compound of a size and a vector_page pointer, which
- * when non-null points out the top-most page of the vector indexing
- * tree. The number of levels is derived from its size with level 0
- * being the leaf level of actual content. E.g., a vector larger than
- * 256 items, has at least two levels, and generally N levels may span
- * up to 256^N content entries.
+ * A vector struct is the "foot part" of an actual containing the
+ * applicable implementation variant for this vector, the intended
+ * slot size and a root pointer for the indexing structure, which
+ * consist of indexing pages according to the variant.
+ *
+ * Variant 0, 1 and 2, involves indexing pages of 256, 16 and 4
+ * pointers respectively. Variant 3 involves a single indexing page of
+ * the size of the vector.
*/
typedef struct {
/**
* Note that variant should not be changed after initialization.
*/
int variant;
+
/**
* The size of the vector.
*/
vector_index size;
+
/**
* The root page of the indexing tree.
*/
* - 3 indicates 64-bit index parts, and 1 page level following the size
*
* The type 3 vector is managed by using realloc.
+ * \related vector
*/
extern unsigned long VECTOR_SLOTS(vector *pv);
vector *pv,
void (*itemdump)(const vector_index ,const void *));
+/**
+ * \brief Sort a vector with quicksort using the provided ordering
+ * collback function.
+ *
+ * \related vector
+ */
extern void vector_qsort(vector *pv,int (*compar)(const void *,const void *));
/**