#include <InvDocList.hpp>
Inheritance diagram for InvDocList:
Public Methods | |
InvDocList () | |
InvDocList (int id, int len) | |
InvDocList (MemCache *mc, int id, int len) | |
constructors for this list getting memory from a MemCache | |
InvDocList (MemCache *mc, int id, int len, int docid, int location) | |
InvDocList (int id, int listlen, int *list, int fr, int *ldocid, int len) | |
constructor for a list not needing to get any memory | |
~InvDocList () | |
void | setList (int id, int listlen, int *list, int fr, int *ldocid=NULL, int len=0) |
void | setListSafe (int id, int listlen, int *list, int fr, int *ldocid, int len) |
void | reset () |
void | resetFree () |
bool | allocMem () |
bool | hasNoMem () |
virtual bool | addTerm (int docid) |
increase count for this docid, we don't care about location | |
virtual bool | append (InvDocList *tail) |
append the given list to the end of this list. watch for overlap of lastdocid of this list and first docid of given list. | |
virtual void | startIteration () |
prepare iteration | |
virtual bool | hasMore () |
test if there's any entry | |
virtual DocInfo * | nextEntry () |
fetch the next entry, return a pointer to a local static memory, so do not delete it | |
virtual void | nextEntry (InvDocInfo *info) |
DOCID_T | curDocID () |
int | docFreq () |
int | length () |
int | termID () |
int | termLen () |
virtual int | termCTF () |
int | curDocIDdiff () |
int | curDocIDtf () |
int | memorySize () |
void | binWrite (ofstream &of) |
write this object in binary to the given filestream. the stream should support binary writing. | |
bool | binRead (ifstream &inf) |
read an object from the given stream into memory. the stream should be pointing to the correct place, starting exactly where binWrite began writing. this method should be used with the empty constructor, else watch out for mem leaks. returns whether the read was successful | |
void | binWriteC (ofstream &of) |
write this object in binary to the given filestream. the stream should support binary writing. RVL compression is used before writing | |
bool | binReadC (ifstream &inf) |
read an object from the given stream into memory. the stream should be pointing to the correct place, starting exactly where binWrite began writing. this method should be used with the empty constructor, else watch out for mem leaks. returns whether the read was successful. RVL decompression is done. | |
Protected Methods | |
bool | getMoreMem () |
int | logb2 (int num) |
virtual void | deltaEncode () |
virtual void | deltaDecode () |
Protected Attributes | |
int * | begin |
int * | lastid |
int * | freq |
int * | end |
int * | iter |
int | size |
int | intsize |
int | strlength |
TERMID_T | uid |
int | df |
MemCache * | cache |
bool | hascache |
bool | READ_ONLY |
Private Attributes | |
InvDocInfo | entry |
|
|
|
constructor for this list using malloc for its own memory usage of InvDocList without MemCache has not been tested |
|
constructors for this list getting memory from a MemCache
|
|
|
|
constructor for a list not needing to get any memory
|
|
|
|
increase count for this docid, we don't care about location
Reimplemented in InvFPDocList. |
|
|
|
append the given list to the end of this list. watch for overlap of lastdocid of this list and first docid of given list.
Reimplemented in InvFPDocList. |
|
read an object from the given stream into memory. the stream should be pointing to the correct place, starting exactly where binWrite began writing. this method should be used with the empty constructor, else watch out for mem leaks. returns whether the read was successful
|
|
read an object from the given stream into memory. the stream should be pointing to the correct place, starting exactly where binWrite began writing. this method should be used with the empty constructor, else watch out for mem leaks. returns whether the read was successful. RVL decompression is done.
|
|
write this object in binary to the given filestream. the stream should support binary writing.
|
|
write this object in binary to the given filestream. the stream should support binary writing. RVL compression is used before writing
|
|
|
|
|
|
|
|
delta decode docids from begin through end call after read Reimplemented in InvFPDocList. |
|
delta encode docids from begin through end call before write Reimplemented in InvFPDocList. |
|
|
|
internal method for allocating more memory to list as needed double what we had before |
|
test if there's any entry
Implements DocInfoList. |
|
|
|
|
|
|
|
|
|
|
|
fetch the next entry, return a pointer to a local static memory, so do not delete it
Implements DocInfoList. Reimplemented in InvFPDocList. |
|
reset the list such that it points to nothing. doesn't free the memory be careful when using this to avoid memory leaks. if you are not managing memory, you should probably use resetFree()
|
|
reset the list and free the memory being used for it
|
|
this is meant for use with the empty constructor this allows the DocList values to be set. however it doesn't guarantee that the outsider will be able to set everything properly. thus, when this method is used, the object becomes READ_ONLY such that methods which attempt to append the contents of the list will not be able to
|
|
same as the setList above. however the READ_ONLY flag will not get set. this method should be used only if you really know what you're doing |
|
prepare iteration
Implements DocInfoList. |
|
Reimplemented in InvFPDocList. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented in InvFPDocList. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|