30template <
class SymbolType = DefaultSymbolType >
31class PostfixRankedTree;
37#include <ext/algorithm>
53#include <string/LinearString.h>
72template <
class SymbolType >
73class PostfixRankedTree final :
public core::Components < PostfixRankedTree < SymbolType >, ext::set < common::ranked_symbol < SymbolType > >, component::Set, GeneralAlphabet > {
115 return this->
template accessComponent < GeneralAlphabet > ( ).get ( );
124 return std::move ( this->
template accessComponent < GeneralAlphabet > ( ).
get ( ) );
133 this->
template accessComponent < GeneralAlphabet > ( ).add ( symbols );
195 out <<
"(PostfixRankedTree";
197 out <<
" content = " << instance.
getContent ( );
212template <
class SymbolType >
214 setContent ( std::move ( data ) );
217template <
class SymbolType >
221template <
class SymbolType >
225template <
class SymbolType >
230template <
class SymbolType >
232 return std::move ( this->m_Data );
235template <
class SymbolType >
237 arityChecksum ( data );
241 throw TreeException (
"Input symbols not in the alphabet." );
244 this->m_Data = std::move ( data );
247template <
class SymbolType >
250 return current + symbol.getRank ( ) - 1;
255template <
class SymbolType >
257 return this->m_Data.empty ( );
269template <
class SymbolType >
283 return std::find ( content.
begin ( ), content.
end ( ), symbol ) != content.
end ( );
314template <
class SymbolType >
static ext::vector< common::ranked_symbol< DefaultSymbolType > > normalizeRankedSymbols(ext::vector< common::ranked_symbol< SymbolType > > &&symbols)
Definition: SymbolNormalize.h:113
static ext::set< common::ranked_symbol< DefaultSymbolType > > normalizeRankedAlphabet(ext::set< common::ranked_symbol< SymbolType > > &&symbols)
Definition: SymbolNormalize.h:59
Definition: ranked_symbol.hpp:20
Definition: components.hpp:181
static void valid(const tree::PostfixRankedTree< SymbolType > &, const common::ranked_symbol< SymbolType > &)
Definition: PostfixRankedTree.h:304
static bool used(const tree::PostfixRankedTree< SymbolType > &tree, const common::ranked_symbol< SymbolType > &symbol)
Definition: PostfixRankedTree.h:280
static bool available(const tree::PostfixRankedTree< SymbolType > &, const common::ranked_symbol< SymbolType > &)
Definition: PostfixRankedTree.h:294
Definition: setComponents.hpp:26
Output iterator calling a callback function on assignment.
Definition: iterator.hpp:923
auto begin() &
Inherited behavior of begin for non-const instance.
Definition: set.hpp:99
auto end() &
Inherited behavior of end for non-const instance.
Definition: set.hpp:129
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
auto begin() &
Inherited behavior of begin for non-const instance.
Definition: vector.hpp:125
auto end() &
Inherited behavior of end for non-const instance.
Definition: vector.hpp:155
Linear string.
Definition: LinearString.h:57
Tree structure represented as linear sequece as result of postorder traversal. The representation is ...
Definition: PostfixRankedTree.h:73
bool operator==(const PostfixRankedTree &other) const
Definition: PostfixRankedTree.h:182
const ext::set< common::ranked_symbol< SymbolType > > & getAlphabet() const &
Definition: PostfixRankedTree.h:114
ext::set< common::ranked_symbol< SymbolType > > && getAlphabet() &&
Definition: PostfixRankedTree.h:123
bool isEmpty() const
Definition: PostfixRankedTree.h:256
const ext::vector< common::ranked_symbol< SymbolType > > & getContent() const &
Definition: PostfixRankedTree.h:226
void setContent(ext::vector< common::ranked_symbol< SymbolType > > data)
Definition: PostfixRankedTree.h:236
void extendAlphabet(const ext::set< common::ranked_symbol< SymbolType > > &symbols)
Definition: PostfixRankedTree.h:132
friend ext::ostream & operator<<(ext::ostream &out, const PostfixRankedTree &instance)
Definition: PostfixRankedTree.h:194
PostfixRankedTree(ext::set< common::ranked_symbol< SymbolType > > alphabet, ext::vector< common::ranked_symbol< SymbolType > > data)
Creates a new instance of the tree with concrete alphabet and content.
Definition: PostfixRankedTree.h:213
Tree structure represented in its natural representation. The representation is so called ranked,...
Definition: RankedTree.h:72
static ext::vector< common::ranked_symbol< SymbolType > > treeToPostfix(const ext::tree< common::ranked_symbol< SymbolType > > &tree)
Definition: TreeAuxiliary.h:253
Definition: TreeException.h:15
Definition: BarSymbol.cpp:12
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
Definition: Permutation.hpp:18
Definition: normalize.hpp:10
Definition: sigHandler.cpp:20
constexpr tuple< Elements &... > tie(Elements &... args) noexcept
Helper of extended tuple of references construction. The tuple is constructed to reffer to values in ...
Definition: tuple.hpp:218
auto begin(Container &&cont) -> decltype(std::forward(cont).begin())
Definition: iterator.hpp:900
void end()
Definition: measurements.cpp:19
auto & get(ext::ptr_array< Type, N > &tpl)
Specialisation of get function for pointer arrays.
Definition: ptr_array.hpp:693
Definition: BackwardOccurrenceTest.h:17
static tree::PostfixRankedTree< > eval(tree::PostfixRankedTree< SymbolType > &&value)
Definition: PostfixRankedTree.h:316
Definition: normalize.hpp:13