LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::Common::FsaAccess::FsaAccessBuilderRandom16 Class Reference

#include <common/FsaAccess/FsaAccessBuilderRandom16.h>

Inheritance diagram for Lima::Common::FsaAccess::FsaAccessBuilderRandom16:
Lima::Common::AbstractModifierOnAccessByString Lima::Common::FsaAccess::FsaAccessReader16< selected_graph_types16::builderGraphType > Lima::Common::AbstractAccessByString Lima::Common::FsaAccess::FsaAccess16< graphType > Lima::Common::FsaAccess::FsaAccessHeader

Public Member Functions

 FsaAccessBuilderRandom16 (bool trie_direction_fwd=true)
 
virtual ~FsaAccessBuilderRandom16 ()
 
void addRandomWord (const Lima::LimaString &newWord) override
 gives the number of entries
 
void write (const std::string &filename)
 
void write (std::ostream &os)
 
void write (FsaAccessDataOutputHandler &oh)
 
FsaAccessIOHandler< graphType > * getFsaAccessIOHandler () const override
 For IO Factory of IO Handler: Handler depends on graphType: with mapping or not.
 
- Public Member Functions inherited from Lima::Common::FsaAccess::FsaAccessReader16< selected_graph_types16::builderGraphType >
 FsaAccessReader16 (bool trie_direction_fwd)
 
virtual ~FsaAccessReader16 ()
 
virtual uint64_t getSize () const override
 gives the number of entries
 
virtual uint64_t getIndex (const LimaString &word) const override
 
virtual std::pair< AccessSuperWordIterator, AccessSuperWordIterator > getSuperWords (const LimaString &word) const override
 
virtual std::pair< AccessSubWordIterator, AccessSubWordIterator > getSubWords (const uint64_t offset, const LimaString &word) const override
 
LimaString getSpelling (const uint64_t index) const override
 get string from index
 
LimaString getExtent (const LimaString &prefix) const
 
void read (const std::string &filename)
 
void read (std::istream &is)
 
void read (FsaAccessDataInputHandler &is)
 
- Public Member Functions inherited from Lima::Common::AbstractAccessByString
virtual ~AbstractAccessByString ()
 
virtual uint64_t getIndex (const Lima::LimaString &word) const =0
 get key index
 
virtual std::pair< AccessSubWordIterator, AccessSubWordIterator > getSubWords (const uint64_t offset, const Lima::LimaString &word) const =0
 get subwords from a string A subword is a word in the key string that begin at the given offset.
 
virtual std::pair< AccessSuperWordIterator, AccessSuperWordIterator > getSuperWords (const Lima::LimaString &word) const =0
 get superWords from a string A superword entry is an entry that begins with the given key
 
- Public Member Functions inherited from Lima::Common::FsaAccess::FsaAccess16< graphType >
 FsaAccess16 (bool trie_direction_fwd)
 
virtual ~FsaAccess16 ()
 
virtual void print (std::ostream &os) const
 
virtual void printGraph (std::ostream &os) const
 
void pack ()
 
void checkIntegrity (dicoVertexType from) const
 check integrity of subgraph
 
- Public Member Functions inherited from Lima::Common::FsaAccess::FsaAccessHeader
 FsaAccessHeader (bool trie_direction_fwd)
 
virtual ~FsaAccessHeader ()
 
void read (AbstractFsaAccessIStreamWrapper &iw)
 
void write (AbstractFsaAccessOStreamWrapper &ow)
 
bool getTrieDirectionForward () const
 
uint64_t getNbVertices () const
 
uint64_t getNbEdges () const
 
void setPackingStatus (uint8_t packingStatus)
 
void setNbVertices (uint64_t nbVerts)
 
void setNbEdges (uint64_t nbEdges)
 

Protected Member Functions

void write (AbstractFsaAccessOStreamWrapper &ow)
 
- Protected Member Functions inherited from Lima::Common::FsaAccess::FsaAccessReader16< selected_graph_types16::builderGraphType >
void read (AbstractFsaAccessIStreamWrapper &iw)
 
uint64_t buildHash ()
 
int computeHash (typename boost::graph_traits< selected_graph_types16::builderGraphType >::vertex_descriptor from)
 
- Protected Member Functions inherited from Lima::Common::FsaAccess::FsaAccess16< graphType >
std::pair< const dicoVertexType, bool > findEquivalentInRegister (dicoVertexType tempState)
 Search for equivalent state in register.
 
bool equivalent (dicoVertexType referenceState, dicoVertexType candidateState) const
 are both state equivalent? We assume that edges are ordered
 
void writeVertices (AbstractFsaAccessOStreamWrapper &ow, FsaAccessIOHandler< graphType > *iOHandler, dicoVertexType from)
 Parcours recursif du graphe avec creation d'un tableau de conversion ptr -> Id On renomme les noeuds avec des numeros consecutifs, pour eviter d'ecrire et de lire l'indice des noeuds (dans le cas ou le parametre vertexList est vecS) et pour se ramener au cas o le parametre vertexList du template adjacencyList est vecS.
 
void readBody (AbstractFsaAccessIStreamWrapper &iw)
 
void writeBody (AbstractFsaAccessOStreamWrapper &ow)
 
PrefixIterator * getPrefixIterator (const LimaString &word, const uint64_t offset=0) const
 For all navigation Factory of prefixIterator (prefixIt depends on direction: forward/reverse)
 
void getPrefix (dicoVertexType &from, PrefixIterator *prefixIt) const
 Recursively goes through the graph from from, following edges labelled by the prefix iterator chars.
 
virtual void addSuffix (dicoVertexType from, PrefixIterator *prefixIt)
 
int32_t findEdge (const char32_t searchChar, const LimaString &textString, int32_t min, int range, int nb_unit_for_char) const
 find the right offset in the vector of out_edge: search for the character currentChar in the string text which contains label of all out_edges using dichotomy search (assume characters are ordered in textString)
 
int32_t findOffsetToInsertBefore (const char32_t searchChar, const LimaString &textString, int32_t min, int range, int nb_unit_per_char) const
 find where to insert currentChar in the string text using dichotomy search (assume characters are ordered in textString)
 
- Protected Member Functions inherited from Lima::Common::FsaAccess::FsaAccessHeader
 FsaAccessHeader (const FsaAccessHeader &h)
 
FsaAccessHeader & operator= (const FsaAccessHeader &h)
 

Additional Inherited Members

- Public Types inherited from Lima::Common::FsaAccess::FsaAccess16< graphType >
typedef boost::graph_traits< graphType >::edge_descriptor dicoEdgeType
 type of vertex descriptor type of edge descriptor
 
typedef boost::graph_traits< graphType >::degree_size_type dico_degree_size_type
 
typedef selected_graph_types16::dicoVertexStatusProperty dicoVertexProperty
 
- Protected Attributes inherited from Lima::Common::FsaAccess::FsaAccessReader16< selected_graph_types16::builderGraphType >
uint64_t m_size
 
- Protected Attributes inherited from Lima::Common::FsaAccess::FsaAccess16< graphType >
graphType m_graph
 
dicoVertexType m_0degreeOutVertex
 
dicoVertexType m_rootVertex
 
uint64_t m_size
 
- Protected Attributes inherited from Lima::Common::FsaAccess::FsaAccessHeader
FsaAccessHeaderPrivate * m_d
 

Detailed Description

Definition at line 38 of file FsaAccessBuilderRandom16.h.

Constructor & Destructor Documentation

◆ FsaAccessBuilderRandom16()

Lima::Common::FsaAccess::FsaAccessBuilderRandom16::FsaAccessBuilderRandom16 ( bool  trie_direction_fwd = true)

Definition at line 30 of file FsaAccessBuilderRandom16.cpp.

◆ ~FsaAccessBuilderRandom16()

Lima::Common::FsaAccess::FsaAccessBuilderRandom16::~FsaAccessBuilderRandom16 ( )
virtual

Definition at line 36 of file FsaAccessBuilderRandom16.cpp.

Member Function Documentation

◆ addRandomWord()

void Lima::Common::FsaAccess::FsaAccessBuilderRandom16::addRandomWord ( const Lima::LimaString &  newWord)
overridevirtual

gives the number of entries

Returns
number of entries

Implements Lima::Common::AbstractModifierOnAccessByString.

Definition at line 111 of file FsaAccessBuilderRandom16.cpp.

◆ getFsaAccessIOHandler()

FsaAccessIOHandler< selected_graph_types16::builderGraphType > * Lima::Common::FsaAccess::FsaAccessBuilderRandom16::getFsaAccessIOHandler ( ) const
overridevirtual

For IO Factory of IO Handler: Handler depends on graphType: with mapping or not.

Implements Lima::Common::FsaAccess::FsaAccess16< graphType >.

Definition at line 41 of file FsaAccessBuilderRandom16.cpp.

◆ write() [1/4]

void Lima::Common::FsaAccess::FsaAccessBuilderRandom16::write ( AbstractFsaAccessOStreamWrapper &  ow)
protected

Definition at line 90 of file FsaAccessBuilderRandom16.cpp.

◆ write() [2/4]

void Lima::Common::FsaAccess::FsaAccessBuilderRandom16::write ( const std::string &  filename)

Definition at line 48 of file FsaAccessBuilderRandom16.cpp.

◆ write() [3/4]

void Lima::Common::FsaAccess::FsaAccessBuilderRandom16::write ( FsaAccessDataOutputHandler &  oh)

Definition at line 78 of file FsaAccessBuilderRandom16.cpp.

◆ write() [4/4]

void Lima::Common::FsaAccess::FsaAccessBuilderRandom16::write ( std::ostream &  os)

Definition at line 66 of file FsaAccessBuilderRandom16.cpp.


The documentation for this class was generated from the following files: