LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::Common::FsaAccess::FsaAccess16< graphType > Class Template Referenceabstract

#include <common/FsaAccess/FsaAccess16.h>

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

Public Types

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
 

Public Member Functions

 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

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
 
virtual FsaAccessIOHandler< graphType > * getFsaAccessIOHandler () const =0
 For IO Factory of IO Handler: Handler depends on graphType: with mapping or not.
 
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)
 

Protected Attributes

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

template<typename graphType>
class Lima::Common::FsaAccess::FsaAccess16< graphType >

Definition at line 180 of file FsaAccess16.h.

Member Typedef Documentation

◆ dico_degree_size_type

template<typename graphType >
typedef boost::graph_traits<graphType>::degree_size_type Lima::Common::FsaAccess::FsaAccess16< graphType >::dico_degree_size_type

Definition at line 188 of file FsaAccess16.h.

◆ dicoEdgeType

template<typename graphType >
typedef boost::graph_traits<graphType>::edge_descriptor Lima::Common::FsaAccess::FsaAccess16< graphType >::dicoEdgeType

type of vertex descriptor type of edge descriptor

Definition at line 186 of file FsaAccess16.h.

◆ dicoVertexProperty

template<typename graphType >
typedef selected_graph_types16::dicoVertexStatusProperty Lima::Common::FsaAccess::FsaAccess16< graphType >::dicoVertexProperty

Definition at line 190 of file FsaAccess16.h.

Constructor & Destructor Documentation

◆ FsaAccess16()

template<typename graphType >
Lima::Common::FsaAccess::FsaAccess16< graphType >::FsaAccess16 ( bool  trie_direction_fwd)

◆ ~FsaAccess16()

template<typename graphType >
virtual Lima::Common::FsaAccess::FsaAccess16< graphType >::~FsaAccess16 ( )
inlinevirtual

Definition at line 193 of file FsaAccess16.h.

Member Function Documentation

◆ addSuffix()

template<typename graphType >
virtual void Lima::Common::FsaAccess::FsaAccess16< graphType >::addSuffix ( dicoVertexType  from,
PrefixIterator *  prefixIt 
)
protectedvirtual

◆ checkIntegrity()

template<typename graphType >
void Lima::Common::FsaAccess::FsaAccess16< graphType >::checkIntegrity ( dicoVertexType  from) const

check integrity of subgraph

◆ equivalent()

template<typename graphType >
bool Lima::Common::FsaAccess::FsaAccess16< graphType >::equivalent ( dicoVertexType  referenceState,
dicoVertexType  candidateState 
) const
protected

are both state equivalent? We assume that edges are ordered

◆ findEdge()

template<typename graphType >
int32_t Lima::Common::FsaAccess::FsaAccess16< graphType >::findEdge ( const char32_t  searchChar,
const LimaString &  textString,
int32_t  min,
int  range,
int  nb_unit_for_char 
) const
protected

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)

◆ findEquivalentInRegister()

template<typename graphType >
std::pair< const dicoVertexType, bool > Lima::Common::FsaAccess::FsaAccess16< graphType >::findEquivalentInRegister ( dicoVertexType  tempState)
protected

Search for equivalent state in register.

v1 and v2 are Equivalent means:

  • v1 and v2 are both final or not final
  • v1 and V2 have same number of out edges
  • label on out edges are the same and lead to same target state We use in this function the capacity of bidirectionnalS adjacency_list to go from tempstate one step through out-edges and then one step through in-edges to find vertex with same target vertex. The final state without out edges is compared first because it is a special case and is often the right state to merge with tempstate (for every word which are not prefixes of another word.

◆ findOffsetToInsertBefore()

template<typename graphType >
int32_t Lima::Common::FsaAccess::FsaAccess16< graphType >::findOffsetToInsertBefore ( const char32_t  searchChar,
const LimaString &  textString,
int32_t  min,
int  range,
int  nb_unit_per_char 
) const
protected

find where to insert currentChar in the string text using dichotomy search (assume characters are ordered in textString)

◆ getFsaAccessIOHandler()

template<typename graphType >
virtual FsaAccessIOHandler< graphType > * Lima::Common::FsaAccess::FsaAccess16< graphType >::getFsaAccessIOHandler ( ) const
protectedpure virtual

◆ getPrefix()

template<typename graphType >
void Lima::Common::FsaAccess::FsaAccess16< graphType >::getPrefix ( dicoVertexType &  from,
PrefixIterator *  prefixIt 
) const
protected

Recursively goes through the graph from from, following edges labelled by the prefix iterator chars.

When it returns, from is the last vertex reachable using the initial prefix content and prefixIt gives access to the remaining of the word.

◆ getPrefixIterator()

template<typename graphType >
PrefixIterator * Lima::Common::FsaAccess::FsaAccess16< graphType >::getPrefixIterator ( const LimaString &  word,
const uint64_t  offset = 0 
) const
protected

For all navigation Factory of prefixIterator (prefixIt depends on direction: forward/reverse)

◆ pack()

template<typename graphType >
void Lima::Common::FsaAccess::FsaAccess16< graphType >::pack ( )

◆ print()

template<typename graphType >
virtual void Lima::Common::FsaAccess::FsaAccess16< graphType >::print ( std::ostream &  os) const
virtual

◆ printGraph()

template<typename graphType >
virtual void Lima::Common::FsaAccess::FsaAccess16< graphType >::printGraph ( std::ostream &  os) const
virtual

◆ readBody()

template<typename graphType >
void Lima::Common::FsaAccess::FsaAccess16< graphType >::readBody ( AbstractFsaAccessIStreamWrapper &  iw)
protected

◆ writeBody()

template<typename graphType >
void Lima::Common::FsaAccess::FsaAccess16< graphType >::writeBody ( AbstractFsaAccessOStreamWrapper &  ow)
protected

◆ writeVertices()

template<typename graphType >
void Lima::Common::FsaAccess::FsaAccess16< graphType >::writeVertices ( AbstractFsaAccessOStreamWrapper &  ow,
FsaAccessIOHandler< graphType > *  iOHandler,
dicoVertexType  from 
)
protected

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.

Member Data Documentation

◆ m_0degreeOutVertex

template<typename graphType >
dicoVertexType Lima::Common::FsaAccess::FsaAccess16< graphType >::m_0degreeOutVertex
protected

Definition at line 254 of file FsaAccess16.h.

◆ m_graph

template<typename graphType >
graphType Lima::Common::FsaAccess::FsaAccess16< graphType >::m_graph
protected

Definition at line 253 of file FsaAccess16.h.

◆ m_rootVertex

template<typename graphType >
dicoVertexType Lima::Common::FsaAccess::FsaAccess16< graphType >::m_rootVertex
protected

Definition at line 255 of file FsaAccess16.h.

◆ m_size

template<typename graphType >
uint64_t Lima::Common::FsaAccess::FsaAccess16< graphType >::m_size
protected

Definition at line 257 of file FsaAccess16.h.


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