geo/vec #
Vectors, in C, for the documentation site and apidoc-clang's tests.
macro VEC_MAX #
The largest length.
struct vec_t #
typedef struct vec_tA vector of numbers.
field data #
double *The numbers.
field len #
size_t How many.
type alias vec_pool #
typedef struct vec_pool vec_poolAn opaque handle to a vector pool.
enum vec_order #
How a vector is ordered.
variant VEC_ASC #
Smallest first.
variant VEC_DESC #
Largest first.
constant VEC_SORTED #
VEC_SORTED = 1constant VEC_UNIQUE #
VEC_UNIQUE = 2function vec_new #
vec_t *Makes a vector.
Parameters
- len
How many numbers; at most
VEC_MAX.
Returns
A vector of
lenzeros, orNULLwhen out of memory.
See also
function vec_free #
void Frees a vector made by vec_new().
function vec_sort #
void Sorts it, see vec_order.
type alias vec_visit #
typedef int A callback over numbers.
variable vec_count #
extern size_t How many vectors there are.