2 // FUNCTION PROTOTYPES: SELF-INDEX ON INTEGERS.
4 int buildIntIndex (uint *intVector, uint n, char *build_options, void **index );
6 //Saves the index to disk
7 int saveIntIndex(void *index, char *pathname);
9 //Returns number of elements in the indexed sequence of integers
10 int sourceLenIntIndex(void *index, uint *numInts);
12 //Loads the index from disk.
13 int loadIntIndex(char *pathname, void **index);
15 //Frees the memory allocated to the int_index
16 int freeIntIndex(void *index);
18 //Returns the size (in bytes) of the index over the sequence of integers.
19 int sizeIntIndex(void *index, uint *numBytes);
21 // Shows detailed summary info of the self-index (memory usage of each structure)
22 int printInfoIntIndex(void *index, const char tab[]);
24 //Number of occurrences of the pattern, and the interval [left,right] in the suffix array
25 int countIntIndex(void *index, uint *pattern, uint length, ulong *numocc, ulong *left, ulong *right);
27 //returns an array with integers corresponding offsets to the occurrences of the pattern,
28 //as well as the number of occurrences
29 int locateIntIndex(void *index, uint *pattern, uint length, ulong **occ, ulong *numocc);
31 //Returns the value of the source (array of integers) at a given offset.
32 // (that is, the element "position" from the original array of uints)
33 int displayIntIndex(void *index, ulong position, uint *value);