A pattern map storing patterns and their values in a hash map (unordered_map).
More...
|
| PatternMap () |
|
void | insert (const Pattern &pattern, ValueType &value) |
|
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) |
|
ValueType & | operator[] (const Pattern &pattern) |
|
ValueType & | operator[] (const PatternPointer &pattern) |
|
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) |
|
| PatternMapStore () |
|
virtual | ~PatternMapStore () |
|
virtual void | write (std::ostream *out) |
|
virtual void | write (std::string filename) |
|
void | read (std::istream *in, int MINTOKENS=0, int MINLENGTH=0, int MAXLENGTH=999999, PatternStoreInterface *constrainstore=NULL, bool DONGRAMS=true, bool DOSKIPGRAMS=true, bool DOFLEXGRAMS=true, bool DORESET=false, bool DEBUG=false) |
|
void | read (std::string filename, int MINTOKENS=0, int MINLENGTH=0, int MAXLENGTH=999999, PatternStoreInterface *constrainstore=NULL, bool DONGRAMS=true, bool DOSKIPGRAMS=true, bool DOFLEXGRAMS=true, bool DORESET=false, bool DEBUG=false) |
|
| 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 ValueType, class ValueHandler = BaseValueHandler<ValueType>, class ReadWriteSizeType = uint64_t>
class PatternMap< ValueType, ValueHandler, ReadWriteSizeType >
A pattern map storing patterns and their values in a hash map (unordered_map).
- Template Parameters
-
ValueType | The type of Value this container stores |
ValueHandler | A handler class for this type of value |
ReadWriteSizeType | The data type for addressing, determines the maximum amount of patterns that can be held, only used in serialisation/deserialisation |