svector.h: vector handling


Vector handling functions for managing integer data and generic data.
Supported vector types (enum eSV_Type):

SV_I8: int8_t
SV_U8: uint8_t
SV_I16: int16_t
SV_U16: uint16_t
SV_I32: int32_t
SV_U32: uint32_t
SV_I64: int64_t
SV_U64: uint64_t
SV_F: float
SV_D: double
SV_GEN: generic-data (user defined)

 sv_alloc  sv_capacity  sv_erase  sv_get_buffer_size  sv_push  sv_set_d 
 sv_alloc_t  sv_capacity_left  sv_find  sv_grow  sv_push_d  sv_set_f 
 sv_alloca  sv_cat  sv_find_d  sv_len  sv_push_f  sv_set_i16 
 sv_alloca_t  sv_cat_erase  sv_find_f  sv_ncmp  sv_push_i16  sv_set_i32 
 sv_at  sv_cat_resize  sv_find_i16  sv_pop  sv_push_i32  sv_set_i64 
 sv_at_d  sv_clear  sv_find_i32  sv_pop_d  sv_push_i64  sv_set_i8 
 sv_at_f  sv_cmp  sv_find_i64  sv_pop_f  sv_push_i8  sv_set_u16 
 sv_at_i16  sv_cpy  sv_find_i8  sv_pop_i16  sv_push_raw  sv_set_u32 
 sv_at_i32  sv_cpy_erase  sv_find_u16  sv_pop_i32  sv_push_u16  sv_set_u64 
 sv_at_i64  sv_cpy_resize  sv_find_u32  sv_pop_i64  sv_push_u32  sv_set_u8 
 sv_at_i8  sv_dup  sv_find_u64  sv_pop_i8  sv_push_u64  sv_shrink 
 sv_at_u16  sv_dup_erase  sv_find_u8  sv_pop_u16  sv_push_u8  sv_size 
 sv_at_u32  sv_dup_resize  sv_free  sv_pop_u32  sv_reserve  sv_sort 
 sv_at_u64  sv_elem_size  sv_get_buffer  sv_pop_u64  sv_resize 
 sv_at_u8  sv_empty  sv_get_buffer_r  sv_pop_u8  sv_set 


srt_vector *sv_alloc(size_t elem_size, size_t initial_num_elems_reserve, const srt_vector_cmp f)



srt_vector *sv_alloc_t(enum eSV_Type t, size_t initial_num_elems_reserve)



srt_vector *sv_alloca(size_t initial_reserve)



srt_vector *sv_alloca_t(enum eSV_Type t, size_t initial_num_elems_reserve)



const void *sv_at(const srt_vector *v, size_t index)



double sv_at_d(const srt_vector *v, size_t index)



float sv_at_f(const srt_vector *v, size_t index)



int16_t sv_at_i16(const srt_vector *v, size_t index)



int32_t sv_at_i32(const srt_vector *v, size_t index)



int64_t sv_at_i64(const srt_vector *v, size_t index)



int8_t sv_at_i8(const srt_vector *v, size_t index)



uint16_t sv_at_u16(const srt_vector *v, size_t index)



uint32_t sv_at_u32(const srt_vector *v, size_t index)



uint64_t sv_at_u64(const srt_vector *v, size_t index)



uint8_t sv_at_u8(const srt_vector *v, size_t index)



size_t sv_capacity(const srt_vector *v)



size_t sv_capacity_left(const srt_vector *v)



srt_vector *sv_cat(srt_vector **v, const srt_vector *v1, ...)



srt_vector *sv_cat_erase(srt_vector **v, const srt_vector *src, size_t off, size_t n)



srt_vector *sv_cat_resize(srt_vector **v, const srt_vector *src, size_t n)



void sv_clear(srt_vector *v)



int sv_cmp(const srt_vector *v, size_t a_off, size_t b_off)



srt_vector *sv_cpy(srt_vector **v, const srt_vector *src)



srt_vector *sv_cpy_erase(srt_vector **v, const srt_vector *src, size_t off, size_t n)



srt_vector *sv_cpy_resize(srt_vector **v, const srt_vector *src, size_t n)



srt_vector *sv_dup(const srt_vector *src)



srt_vector *sv_dup_erase(const srt_vector *src, size_t off, size_t n)



srt_vector *sv_dup_resize(const srt_vector *src, size_t n)



uint8_t sv_elem_size(enum eSV_Type t)



srt_bool sv_empty(const srt_vector *v)



srt_vector *sv_erase(srt_vector **v, size_t off, size_t n)



size_t sv_find(const srt_vector *v, size_t off, const void *target)



size_t sv_find_d(const srt_vector *v, size_t off, double target)



size_t sv_find_f(const srt_vector *v, size_t off, float target)



size_t sv_find_i16(const srt_vector *v, size_t off, int16_t target)



size_t sv_find_i32(const srt_vector *v, size_t off, int32_t target)



size_t sv_find_i64(const srt_vector *v, size_t off, int64_t target)



size_t sv_find_i8(const srt_vector *v, size_t off, int8_t target)



size_t sv_find_u16(const srt_vector *v, size_t off, uint16_t target)



size_t sv_find_u32(const srt_vector *v, size_t off, uint32_t target)



size_t sv_find_u64(const srt_vector *v, size_t off, uint64_t target)



size_t sv_find_u8(const srt_vector *v, size_t off, uint8_t target)



void sv_free(srt_vector **v, ...)



char *sv_get_buffer(srt_vector *v)



const char *sv_get_buffer_r(const srt_vector *v)



size_t sv_get_buffer_size(const srt_vector *v)



size_t sv_grow(srt_vector **v, size_t extra_elems)



size_t sv_len(const srt_vector *v)



int sv_ncmp(const srt_vector *v1, size_t v1off, const srt_vector *v2, size_t v2off, size_t n)



void *sv_pop(srt_vector *v)



double sv_pop_d(srt_vector *v)



float sv_pop_f(srt_vector *v)



int16_t sv_pop_i16(srt_vector *v)



int32_t sv_pop_i32(srt_vector *v)



int64_t sv_pop_i64(srt_vector *v)



int8_t sv_pop_i8(srt_vector *v)



uint16_t sv_pop_u16(srt_vector *v)



uint32_t sv_pop_u32(srt_vector *v)



uint64_t sv_pop_u64(srt_vector *v)



uint8_t sv_pop_u8(srt_vector *v)



srt_bool sv_push(srt_vector **v, const void *c1, ...)



srt_bool sv_push_d(srt_vector **v, double c)



srt_bool sv_push_f(srt_vector **v, float c)



srt_bool sv_push_i16(srt_vector **v, int16_t c)



srt_bool sv_push_i32(srt_vector **v, int32_t c)



srt_bool sv_push_i64(srt_vector **v, int64_t c)



srt_bool sv_push_i8(srt_vector **v, int8_t c)



srt_bool sv_push_raw(srt_vector **v, const void *src, size_t n)



srt_bool sv_push_u16(srt_vector **v, uint16_t c)



srt_bool sv_push_u32(srt_vector **v, uint32_t c)



srt_bool sv_push_u64(srt_vector **v, uint64_t c)



srt_bool sv_push_u8(srt_vector **v, uint8_t c)



size_t sv_reserve(srt_vector **v, size_t max_elems)



srt_vector *sv_resize(srt_vector **v, size_t n)



srt_bool sv_set(srt_vector **v, size_t index, const void *value)



srt_bool sv_set_d(srt_vector **v, size_t index, double value)



srt_bool sv_set_f(srt_vector **v, size_t index, float value)



srt_bool sv_set_i16(srt_vector **v, size_t index, int16_t value)



srt_bool sv_set_i32(srt_vector **v, size_t index, int32_t value)



srt_bool sv_set_i64(srt_vector **v, size_t index, int64_t value)



srt_bool sv_set_i8(srt_vector **v, size_t index, int8_t value)



srt_bool sv_set_u16(srt_vector **v, size_t index, uint16_t value)



srt_bool sv_set_u32(srt_vector **v, size_t index, uint32_t value)



srt_bool sv_set_u64(srt_vector **v, size_t index, uint64_t value)



srt_bool sv_set_u8(srt_vector **v, size_t index, uint8_t value)



srt_vector *sv_shrink(srt_vector **v)



size_t sv_size(const srt_vector *v)



srt_vector *sv_sort(srt_vector *v)