Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Member Functions | Friends
tree::UnrankedTree< SymbolType > Class Template Reference

Tree represented in its natural representation. The representation is so called unranked, therefore it consists of unranked symbols. More...

#include <UnrankedTree.h>

Inheritance diagram for tree::UnrankedTree< SymbolType >:
[legend]
Collaboration diagram for tree::UnrankedTree< SymbolType >:
[legend]

Public Member Functions

 UnrankedTree (ext::set< SymbolType > alphabet, ext::tree< SymbolType > tree)
 Creates a new instance of the pattern with concrete alphabet and content. More...
 
 UnrankedTree (ext::tree< SymbolType > pattern)
 Creates a new instance of the pattern with concrete content. The alphabet is deduced from the content. More...
 
 UnrankedTree (const RankedTree< SymbolType > &other)
 Creates a new instance of the pattern based on RankedTree, the alphabet is created from the content of the RankedTree. More...
 
const ext::set< SymbolType > & getAlphabet () const &
 
ext::set< SymbolType > && getAlphabet () &&
 
void extendAlphabet (const ext::set< SymbolType > &symbols)
 
const ext::tree< SymbolType > & getContent () const &
 
ext::tree< SymbolType > && getContent () &&
 
void setTree (ext::tree< SymbolType > data)
 
auto operator<=> (const UnrankedTree &other) const
 
bool operator== (const UnrankedTree &other) const
 
void nicePrint (ext::ostream &os) const
 
- Public Member Functions inherited from core::Components< UnrankedTree< SymbolType >, ext::set< SymbolType >, component::Set, GeneralAlphabet >
void accessComponent ()
 

Friends

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

Additional Inherited Members

- Static Public Member Functions inherited from core::Components< UnrankedTree< SymbolType >, ext::set< SymbolType >, component::Set, GeneralAlphabet >
static void registerComponent ()
 
static void unregisterComponent ()
 

Detailed Description

template<class SymbolType>
class tree::UnrankedTree< SymbolType >

Tree represented in its natural representation. The representation is so called unranked, therefore it consists of unranked symbols.

T = ( A, C ), A (Alphabet) = finite set of symbols, C (Content) = pattern in its natural representation

Template Parameters
SymbolTypeused for the symbol of the alphabet

Constructor & Destructor Documentation

◆ UnrankedTree() [1/3]

template<class SymbolType >
tree::UnrankedTree< SymbolType >::UnrankedTree ( ext::set< SymbolType >  alphabet,
ext::tree< SymbolType >  tree 
)
explicit

Creates a new instance of the pattern with concrete alphabet and content.

Parameters
alphabetthe initial alphabet of the pattern
patternthe initial content in it's natural representation

◆ UnrankedTree() [2/3]

template<class SymbolType >
tree::UnrankedTree< SymbolType >::UnrankedTree ( ext::tree< SymbolType >  pattern)
explicit

Creates a new instance of the pattern with concrete content. The alphabet is deduced from the content.

Parameters
patternthe initial content in it's natural representation

◆ UnrankedTree() [3/3]

template<class SymbolType >
tree::UnrankedTree< SymbolType >::UnrankedTree ( const RankedTree< SymbolType > &  other)
explicit

Creates a new instance of the pattern based on RankedTree, the alphabet is created from the content of the RankedTree.

Parameters
otherthe pattern represented as RankedNonlinearPattern

Member Function Documentation

◆ extendAlphabet()

template<class SymbolType >
void tree::UnrankedTree< SymbolType >::extendAlphabet ( const ext::set< SymbolType > &  symbols)
inline

Adder of an alphabet symbols.

Parameters
symbolsthe new symbols to be added to the alphabet

◆ getAlphabet() [1/2]

template<class SymbolType >
ext::set< SymbolType > && tree::UnrankedTree< SymbolType >::getAlphabet ( ) &&
inline

Getter of the alphabet.

Returns
the alphabet of the pattern
Here is the call graph for this function:

◆ getAlphabet() [2/2]

template<class SymbolType >
const ext::set< SymbolType > & tree::UnrankedTree< SymbolType >::getAlphabet ( ) const &
inline

Getter of the alphabet.

Returns
the alphabet of the pattern
Here is the caller graph for this function:

◆ getContent() [1/2]

template<class SymbolType >
ext::tree< SymbolType > && tree::UnrankedTree< SymbolType >::getContent ( ) &&

Getter of the pattern representation.

Returns
the natural representation of the pattern.

◆ getContent() [2/2]

template<class SymbolType >
const ext::tree< SymbolType > & tree::UnrankedTree< SymbolType >::getContent ( ) const &

Getter of the pattern representation.

Returns
the natural representation of the pattern.
Here is the caller graph for this function:

◆ nicePrint()

template<class SymbolType >
void tree::UnrankedTree< SymbolType >::nicePrint ( ext::ostream os) const

Nice printer of the tree natural representation

Parameters
osthe output stream to print to
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<=>()

template<class SymbolType >
auto tree::UnrankedTree< SymbolType >::operator<=> ( const UnrankedTree< 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 >
bool tree::UnrankedTree< SymbolType >::operator== ( const UnrankedTree< 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:

◆ setTree()

template<class SymbolType >
void tree::UnrankedTree< SymbolType >::setTree ( ext::tree< SymbolType >  data)

Setter of the representation of the pattern.

Exceptions
TreeExceptionin same situations as checkAlphabet
Parameters
patternnew representation of the pattern.

Friends And Related Function Documentation

◆ operator<<

template<class SymbolType >
ext::ostream & operator<< ( ext::ostream out,
const UnrankedTree< 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: