Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Member Functions | Friends
indexes::stringology::FactorOracleAutomaton< SymbolType > Class Template Referencefinal

Factor oracle automaton string index. Stores a deterministic finite automaton. The automaton is of exactly linear size as the indexed string. The automaton represents at least all factors of the indexed string. The class does not check whether the automaton represent valid index. More...

#include <FactorOracleAutomaton.h>

Public Member Functions

 FactorOracleAutomaton (automaton::DFA< SymbolType, unsigned > automaton)
 
const automaton::DFA< SymbolType, unsigned > & getAutomaton () const &
 
automaton::DFA< SymbolType, unsigned > && getAutomaton () &&
 
const ext::set< SymbolType > & getAlphabet () const &
 
ext::set< SymbolType > && getAlphabet () &&
 
bool removeSymbolFromAlphabet (const SymbolType &symbol)
 
unsigned getBackboneLength () const
 
auto operator<=> (const FactorOracleAutomaton &other) const
 
bool operator== (const FactorOracleAutomaton &other) const
 
 operator automaton::DFA< SymbolType, unsigned > () const
 

Friends

ext::ostreamoperator<< (ext::ostream &out, const FactorOracleAutomaton &instance)
 

Detailed Description

template<class SymbolType = DefaultSymbolType>
class indexes::stringology::FactorOracleAutomaton< SymbolType >

Factor oracle automaton string index. Stores a deterministic finite automaton. The automaton is of exactly linear size as the indexed string. The automaton represents at least all factors of the indexed string. The class does not check whether the automaton represent valid index.

Template Parameters
SymbolTypetype of symbols of indexed string

Constructor & Destructor Documentation

◆ FactorOracleAutomaton()

template<class SymbolType >
indexes::stringology::FactorOracleAutomaton< SymbolType >::FactorOracleAutomaton ( automaton::DFA< SymbolType, unsigned >  automaton)
explicit

Creates a new instance of the index based on the raw factor oracle automaton.

Parameters
automatonthe factor oracle automaton

Member Function Documentation

◆ getAlphabet() [1/2]

template<class SymbolType = DefaultSymbolType>
ext::set< SymbolType > && indexes::stringology::FactorOracleAutomaton< SymbolType >::getAlphabet ( ) &&
inline

Getter of the alphabet of the indexed string.

Returns
the alphabet of the indexed string

◆ getAlphabet() [2/2]

template<class SymbolType = DefaultSymbolType>
const ext::set< SymbolType > & indexes::stringology::FactorOracleAutomaton< SymbolType >::getAlphabet ( ) const &
inline

Getter of the alphabet of the indexed string.

Returns
the alphabet of the indexed string

◆ getAutomaton() [1/2]

template<class SymbolType = DefaultSymbolType>
automaton::DFA< SymbolType, unsigned > && indexes::stringology::FactorOracleAutomaton< SymbolType >::getAutomaton ( ) &&

Getter of the raw factor oracle automaton

Returns
the raw factor oracle automaton

◆ getAutomaton() [2/2]

template<class SymbolType = DefaultSymbolType>
const automaton::DFA< SymbolType, unsigned > & indexes::stringology::FactorOracleAutomaton< SymbolType >::getAutomaton ( ) const &

Getter of the raw factor oracle automaton

Returns
the raw factor oracle automaton
Here is the caller graph for this function:

◆ getBackboneLength()

template<class SymbolType = DefaultSymbolType>
unsigned indexes::stringology::FactorOracleAutomaton< SymbolType >::getBackboneLength ( ) const
inline

Getter of the backbone length of the automaton. The length is equal to the longest path through the automaton.

Returns
the length of the backbone

◆ operator automaton::DFA< SymbolType, unsigned >()

template<class SymbolType >
indexes::stringology::FactorOracleAutomaton< SymbolType >::operator automaton::DFA< SymbolType, unsigned >
explicit

Cast operator to the underlying autoamton.

Returns
the raw automaton

◆ operator<=>()

template<class SymbolType = DefaultSymbolType>
auto indexes::stringology::FactorOracleAutomaton< SymbolType >::operator<=> ( const FactorOracleAutomaton< SymbolType > &  other) const
inline

The three way comparison implementation

Parameters
otherthe other instance
Returns
the ordering between this object and the other.
Here is the call graph for this function:

◆ operator==()

template<class SymbolType = DefaultSymbolType>
bool indexes::stringology::FactorOracleAutomaton< SymbolType >::operator== ( const FactorOracleAutomaton< SymbolType > &  other) const
inline

The equality comparison implementation.

Parameters
otherthe other object to compare with.
Returns
true if this and other objects are equal, false othervise
Here is the call graph for this function:

◆ removeSymbolFromAlphabet()

template<class SymbolType = DefaultSymbolType>
bool indexes::stringology::FactorOracleAutomaton< SymbolType >::removeSymbolFromAlphabet ( const SymbolType &  symbol)
inline

Remover of a symbol from the alphabet. The symbol can be removed if it is not used in any of bit vector keys.

Parameters
symbola symbol to remove.

Friends And Related Function Documentation

◆ operator<<

template<class SymbolType = DefaultSymbolType>
ext::ostream & operator<< ( ext::ostream out,
const FactorOracleAutomaton< SymbolType > &  instance 
)
friend

Print this object as raw representation to ostream.

Parameters
outostream where to print
instanceobject to print
Returns
modified output stream

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