9 #ifndef __ZEDA_INDEX_H__ 10 #define __ZEDA_INDEX_H__ 40 #define zIndexIncSize(i) ( zArraySize(i)++ ) 42 #define zIndexDecSize(i) ( zArraySize(i) -= ( zArraySize(i) > 0 ? 1 : 0 ) ) 45 #define zIndexPosIsValid(i,n) zArrayPosIsValid( i, n ) 47 #define zIndexElemNC(i,n) zArrayBuf(i)[n] 48 #define zIndexElem(i,n) ( zIndexPosIsValid(i,n) ? zIndexElemNC(i,n) : -1 ) 49 #define zIndexSetElemNC(i,n,e) ( zIndexElemNC(i,n) = (e) ) 50 #define zIndexSetElem(i,n,e) ( zIndexPosIsValid(i,n) ? zIndexSetElemNC(i,n,e) : -1 ) 52 #define zIndexHead(idx) ( *zArrayHead(idx) ) 53 #define zIndexNeck(idx) ( *zArrayNeck(idx) ) 54 #define zIndexTail(idx) ( *zArrayTail(idx) ) 176 #define zIndexScan() zIndexFScan( stdin ) 193 #define zIndexPrint(i) zIndexFPrint( stdout, i ) 207 #define zIndexDataPrint(i) zIndexDataFPrint( stdout, i ) Definition: zeda_list.h:413
zIndex zIndexCreate(int size)
create an array of integer values.
int zIndexSwap(zIndex idx, int p1, int p2)
swap two elements of an array of integer values.
#define zArrayClass(array_t, cell_t)
generate array class.
Definition: zeda_array.h:53
zIndex zIndexAlloc(int size)
allocate an array of integer values.
zIndex zIndexSetList(zIndex idx,...)
set elements of an integer vector from argument list.
zIndex zIndexZero(zIndex idx)
zero an array of integer values.
#define __END_DECLS
Definition: zeda_defs.h:30
zIndex zIndexFScan(FILE *fp)
scan an array of integer values from a file.
bool zIndexIsEqual(zIndex idx1, zIndex idx2)
check if two arrays of integer values are equal.
void zIndexDataFPrint(FILE *fp, zIndex idx)
print an array of integer values out to a file.
zIndex zIndexOrder(zIndex idx, int s)
order an array of integer values.
zIndexStruct * zIndex
Definition: zeda_index.h:37
int zIndexMove(zIndex idx, int from, int to)
move an element of an array of integer values.
Definition: zeda_index.h:36
zIndex zIndexCreateFromList(zIntList *list)
create an integer vector from a list of integers.
zIndex zIndexCreateList(int num,...)
create an array of integer according to a specified list of arguments.
#define __BEGIN_DECLS
Definition: zeda_defs.h:26
integer value array class
void zIndexFPrint(FILE *fp, zIndex idx)
print an array of integer values to a file.
#define __EXPORT
Definition: zeda_compat.h:32
void zIndexFree(zIndex idx)
free an array of integer values.
#define zIndexPrint(i)
Definition: zeda_index.h:193