00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _INVFPDOCLIST_HPP
00014 #define _INVFPDOCLIST_HPP
00015
00016
00017
00018
00019
00020
00021
00022 #include <cmath>
00023 #include "common_headers.hpp"
00024 #include "InvDocList.hpp"
00025 #include "InvFPDocInfo.hpp"
00026 #include "MemCache.hpp"
00027
00028 extern "C" {
00029 #include <cstdio>
00030 }
00031
00032 #define DEFAULT 9
00033
00034 class InvFPDocList: public InvDocList {
00035 public:
00036 InvFPDocList();
00038 InvFPDocList(int *vec);
00039
00042 InvFPDocList(int id, int len);
00044 InvFPDocList(MemCache* mc, int id, int len);
00045 InvFPDocList(MemCache* mc, int id, int len, int docid, int location);
00047 InvFPDocList(int id, int listlen, int* list, int fr, int* ldocid, int len);
00048 ~InvFPDocList();
00049
00050 bool addTerm(int docid);
00051 bool addLocation(int docid, LOC_T location);
00052 bool append(InvDocList* tail);
00053
00054 virtual DocInfo* nextEntry();
00055 virtual void nextEntry(InvFPDocInfo* info);
00056 virtual int termCTF();
00057 int *byteVec(int &len);
00058
00059 protected:
00062 virtual void deltaEncode();
00063
00066 virtual void deltaDecode();
00067 private:
00068 InvFPDocInfo entry;
00069 };
00070
00071 #endif