A pattern store in the form of an unordered set (i.e, no duplicates). Stores only patterns, no values.
More...
|
| | PatternSet () |
| |
| | PatternSet (const ClassDecoder &classdecoder) |
| |
| | PatternSet (const ClassEncoder &classencoder) |
| |
| virtual | ~PatternSet () |
| |
| void | insert (const Pattern &pattern) |
| |
| bool | has (const Pattern &pattern) const |
| |
| bool | has (const PatternPointer &pattern) const |
| |
| size_t | size () const |
| |
| void | reserve (size_t s) |
| |
| iterator | begin () |
| |
| const_iterator | begin () const |
| |
| iterator | end () |
| |
| const_iterator | end () const |
| |
| iterator | find (const Pattern &pattern) |
| |
| const_iterator | find (const Pattern &pattern) const |
| |
| iterator | find (const PatternPointer &pattern) |
| |
| const_iterator | find (const PatternPointer &pattern) const |
| |
| bool | erase (const Pattern &pattern) |
| |
| iterator | erase (const_iterator position) |
| |
| void | write (std::ostream *out) |
| |
| void | read (std::istream *in, int MINLENGTH=0, int MAXLENGTH=999999, PatternStoreInterface *constrainstore=NULL, bool DONGRAMS=true, bool DOSKIPGRAMS=true, bool DOFLEXGRAMS=true) |
| |
| template<class ReadValueType , class ReadValueHandler = BaseValueHandler<ReadValueType>> |
| void | readmap (std::istream *in, int MINTOKENS=0, int MINLENGTH=0, int MAXLENGTH=999999, PatternStoreInterface *constrainstore=NULL, bool DONGRAMS=true, bool DOSKIPGRAMS=true, bool DOFLEXGRAMS=true) |
| |
| | PatternStore () |
| |
| virtual | ~PatternStore () |
| |
| virtual void | attachcorpus (unsigned char *corpusstart, unsigned int corpussize) |
| |
| virtual void | attachcorpus (const IndexedCorpus &corpus) |
| |
| virtual void | detachcorpus () |
| |
| unsigned char * | getcorpus () const |
| |
| unsigned int | getcorpussize () const |
| |
| virtual void | use_v1_format () |
| |
| virtual PatternStoreInterface * | getstoreinterface () |
| |
template<class ReadWriteSizeType = uint32_t>
class PatternSet< ReadWriteSizeType >
A pattern store in the form of an unordered set (i.e, no duplicates). Stores only patterns, no values.
- Template Parameters
-
| ReadWriteSizeType | The data type for addressing, determines the maximum amount of patterns that can be held, only used in serialisation/deserialisation |
template<class ReadWriteSizeType = uint32_t>
template<class ReadValueType , class ReadValueHandler = BaseValueHandler<ReadValueType>>
| void PatternSet< ReadWriteSizeType >::readmap |
( |
std::istream * |
in, |
|
|
int |
MINTOKENS = 0, |
|
|
int |
MINLENGTH = 0, |
|
|
int |
MAXLENGTH = 999999, |
|
|
PatternStoreInterface * |
constrainstore = NULL, |
|
|
bool |
DONGRAMS = true, |
|
|
bool |
DOSKIPGRAMS = true, |
|
|
bool |
DOFLEXGRAMS = true |
|
) |
| |
|
inline |
Reads a map from input stream, in binary format, but ignores the values and retains only the keys for the set.