|
liba 0.1.15
An algorithm library based on C/C++
|
basic vector library More...
#include "a.h"Go to the source code of this file.
Data Structures | |
| struct | a_vec |
| instance structure for basic vector More... | |
Macros | |
| #define | A_VEC_PTR(T, ctx) |
| #define | A_VEC_AT_(T, ctx, idx) |
| #define | A_VEC_AT(T, ctx, idx) |
| #define | A_VEC_OF(T, ctx, idx) |
| #define | A_VEC_TOP_(T, ctx) |
| #define | A_VEC_TOP(T, ctx) |
| #define | A_VEC_END_(T, ctx) |
| #define | A_VEC_END(T, ctx) |
| #define | A_VEC_PUSH_SORT(T, ctx, key, cmp) |
| #define | A_VEC_SEARCH(T, ctx, obj, cmp) |
| #define | A_VEC_INSERT(T, ctx, idx) |
| #define | A_VEC_REMOVE(T, ctx, idx) |
| #define | A_VEC_PUSH_FORE(T, ctx) |
| #define | A_VEC_PUSH_BACK(T, ctx) |
| #define | A_VEC_PULL_FORE(T, ctx) |
| #define | A_VEC_PULL_BACK(T, ctx) |
| #define | A_VEC_PUSH(T, ctx) |
| #define | A_VEC_PULL(T, ctx) |
| #define | a_vec_forenum(i, ctx) |
| iterate over a vector | |
| #define | A_VEC_FORENUM(I, i, ctx) |
| #define | a_vec_forenum_reverse(i, ctx) |
| iterate over a vector in reverse | |
| #define | A_VEC_FORENUM_REVERSE(I, i, ctx) |
| #define | a_vec_foreach(T, S, it, ctx) |
| iterate over a vector | |
| #define | A_VEC_FOREACH(T, it, at, ctx) |
| #define | a_vec_foreach_reverse(T, S, it, ctx) |
| iterate over a vector in reverse | |
| #define | A_VEC_FOREACH_REVERSE(T, it, at, ctx) |
Typedefs | |
| typedef struct a_vec | a_vec |
| instance structure for basic vector | |
Functions | |
| void * | a_vec_ptr (a_vec const *ctx) |
| access address of vector for a pointer to vector structure | |
| a_size | a_vec_siz (a_vec const *ctx) |
| access size of a element for a pointer to vector structure | |
| a_size | a_vec_num (a_vec const *ctx) |
| access number of element for a pointer to vector structure | |
| a_size | a_vec_mem (a_vec const *ctx) |
| access memory of element for a pointer to vector structure | |
| void * | a_vec_at_ (a_vec const *ctx, a_size idx) |
| access specified element for a pointer to vector structure | |
| void * | a_vec_at (a_vec const *ctx, a_size idx) |
| access specified element for a pointer to vector structure | |
| void * | a_vec_of (a_vec const *ctx, a_diff idx) |
| access specified element for a pointer to vector structure | |
| void * | a_vec_top_ (a_vec const *ctx) |
| access top element for a pointer to vector structure | |
| void * | a_vec_top (a_vec const *ctx) |
| access top element for a pointer to vector structure | |
| void * | a_vec_end_ (a_vec const *ctx) |
| access end pointer for a pointer to vector structure | |
| void * | a_vec_end (a_vec const *ctx) |
| access end pointer for a pointer to vector structure | |
| a_vec * | a_vec_new (a_size size) |
| allocate a pointer to vector structure from memory | |
| void | a_vec_die (a_vec *ctx, void(*dtor)(void *)) |
| deallocate a pointer to vector structure | |
| void | a_vec_ctor (a_vec *ctx, a_size size) |
| constructor for vector structure | |
| void | a_vec_dtor (a_vec *ctx, void(*dtor)(void *)) |
| destructor for vector structure | |
| void | a_vec_swap (a_vec *lhs, a_vec *rhs) |
| swap the contents of two pointers to vector structure | |
| int | a_vec_setm (a_vec *ctx, a_size mem) |
| set memory of element for a pointer to vector structure | |
| int | a_vec_setn (a_vec *ctx, a_size num, void(*dtor)(void *)) |
| set number of element for a pointer to vector structure | |
| void | a_vec_setz (a_vec *ctx, a_size siz, void(*dtor)(void *)) |
| set size of a element for a pointer to vector structure | |
| void | a_vec_sort (a_vec const *ctx, int(*cmp)(void const *, void const *)) |
| sort all elements for a pointer to vector structure | |
| void | a_vec_sort_fore (a_vec const *ctx, int(*cmp)(void const *, void const *)) |
| insert sort foremost element for a pointer to vector structure | |
| void | a_vec_sort_back (a_vec const *ctx, int(*cmp)(void const *, void const *)) |
| insert sort backmost element for a pointer to vector structure | |
| void * | a_vec_push_sort (a_vec *ctx, void const *key, int(*cmp)(void const *, void const *)) |
| push an element into the vector and sort it | |
| void * | a_vec_search (a_vec const *ctx, void const *obj, int(*cmp)(void const *, void const *)) |
| search the given element in this vector | |
| void * | a_vec_insert (a_vec *ctx, a_size idx) |
| insert an element into the vector | |
| void * | a_vec_remove (a_vec *ctx, a_size idx) |
| remove an element from the vector | |
| void * | a_vec_push_fore (a_vec *ctx) |
| push an element into the vector forward | |
| void * | a_vec_push_back (a_vec *ctx) |
| push an element into the vector backward | |
| void * | a_vec_pull_fore (a_vec *ctx) |
| pull an element from the vector forward | |
| void * | a_vec_pull_back (a_vec *ctx) |
| pull an element from the vector backward | |
| int | a_vec_store (a_vec *ctx, a_size idx, void *ptr, a_size num, int(*copy)(void *, void const *)) |
| store elements into the vector | |
| int | a_vec_erase (a_vec *ctx, a_size idx, a_size num, void(*dtor)(void *)) |
| erase elements from the vector | |
| void * | a_vec_push (a_vec *ctx) |
| push an element into the vector | |
| void * | a_vec_pull (a_vec *ctx) |
| pull an element from the vector | |
basic vector library