Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
PrefixRankedBarNonlinearPattern.h
Go to the documentation of this file.
1
6/*
7 * This file is part of Algorithms library toolkit.
8 * Copyright (C) 2017 Jan Travnicek (jan.travnicek@fit.cvut.cz)
9
10 * Algorithms library toolkit is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14
15 * Algorithms library toolkit is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19
20 * You should have received a copy of the GNU General Public License
21 * along with Algorithms library toolkit. If not, see <http://www.gnu.org/licenses/>.
22 */
23
24#pragma once
25
27
28namespace tree {
29
30template < class SymbolType = DefaultSymbolType >
31class PrefixRankedBarNonlinearPattern;
32
33} /* namespace tree */
34
35#include <numeric>
36
37#include <ext/algorithm>
38
39#include <alib/set>
40#include <alib/vector>
41#include <alib/tree>
42#include <alib/deque>
43
44#include <core/components.hpp>
46
47#include <tree/TreeException.h>
49
50#include <alphabet/BarSymbol.h>
53
54#include <core/normalize.hpp>
56
57#include <string/LinearString.h>
58
59#include "PrefixRankedBarTree.h"
61#include "RankedTree.h"
62#include "RankedPattern.h"
64
65namespace tree {
66
67class GeneralAlphabet;
68class SubtreeWildcard;
69class BarSymbols;
70class VariablesBarSymbol;
71class NonlinearAlphabet;
72
90template < class SymbolType >
91class PrefixRankedBarNonlinearPattern final : public core::Components < PrefixRankedBarNonlinearPattern < SymbolType >, ext::set < common::ranked_symbol < SymbolType > >, component::Set, std::tuple < GeneralAlphabet, NonlinearAlphabet, BarSymbols >, common::ranked_symbol < SymbolType >, component::Value, std::tuple < SubtreeWildcard, VariablesBarSymbol > > {
96
102 void arityChecksum ( const ext::vector < common::ranked_symbol < SymbolType > > & data );
103
104public:
116
127
137
146
155
164
171
178
185
192
199
206 return this->template accessComponent < GeneralAlphabet > ( ).get ( );
207 }
208
215 return std::move ( this->template accessComponent < GeneralAlphabet > ( ).get ( ) );
216 }
217
224 this->template accessComponent < GeneralAlphabet > ( ).add ( symbols );
225 }
226
233 return this->template accessComponent < BarSymbols > ( ).get ( );
234 }
235
242 return std::move ( this->template accessComponent < BarSymbols > ( ).get ( ) );
243 }
244
251 this->template accessComponent < BarSymbols > ( ).add ( bars );
252 }
253
260 return this->template accessComponent < SubtreeWildcard > ( ).get ( );
261 }
262
269 return std::move ( this->template accessComponent < SubtreeWildcard > ( ).get ( ) );
270 }
271
278 return this->template accessComponent < NonlinearAlphabet > ( ).get ( );
279 }
280
287 return std::move ( this->template accessComponent < NonlinearAlphabet > ( ).get ( ) );
288 }
289
296 return this->template accessComponent < VariablesBarSymbol > ( ).get ( );
297 }
298
305 return std::move ( this->template accessComponent < VariablesBarSymbol > ( ).get ( ) );
306 }
307
314
320 ext::vector < common::ranked_symbol < SymbolType > > && getContent ( ) &&;
321
329 void setContent ( ext::vector < common::ranked_symbol < SymbolType > > data );
330
334 bool isEmpty ( ) const;
335
343 auto operator <=> ( const PrefixRankedBarNonlinearPattern & other ) const {
344 return std::tie ( m_Data, getAlphabet ( ), getSubtreeWildcard ( ), getNonlinearVariables ( ), getBars ( ), getVariablesBar ( ) ) <=> std::tie ( other.m_Data, other.getAlphabet ( ), other.getSubtreeWildcard ( ), other.getNonlinearVariables ( ), other.getBars ( ), other.getVariablesBar ( ) );
345 }
346
354 bool operator == ( const PrefixRankedBarNonlinearPattern & other ) const {
355 return std::tie ( m_Data, getAlphabet ( ), getSubtreeWildcard ( ), getNonlinearVariables ( ), getBars ( ), getVariablesBar ( ) ) == std::tie ( other.m_Data, other.getAlphabet ( ), other.getSubtreeWildcard ( ), other.getNonlinearVariables ( ), other.getBars ( ), other.getVariablesBar ( ) );
356 }
357
367 out << "(PrefixRankedBarNonlinearPattern";
368 out << " alphabet = " << instance.getAlphabet ( );
369 out << " bars = " << instance.getBars ( );
370 out << " variablesBar = " << instance.getVariablesBar ( );
371 out << " content = " << instance.getContent ( );
372 out << " nonlinearVariables = " << instance.getNonlinearVariables ( );
373 out << " subtreeWildcard = " << instance.getSubtreeWildcard ( );
374 out << ")";
375 return out;
376 }
377
385 }
386};
387
388template < class SymbolType >
389PrefixRankedBarNonlinearPattern < SymbolType >::PrefixRankedBarNonlinearPattern ( ext::set < common::ranked_symbol < SymbolType > > bars, common::ranked_symbol < SymbolType > variablesBar, common::ranked_symbol < SymbolType > subtreeWildcard, ext::set < common::ranked_symbol < SymbolType > > nonlinearVariables, ext::set < common::ranked_symbol < SymbolType > > alphabet, ext::vector < common::ranked_symbol < SymbolType > > data ) : core::Components < PrefixRankedBarNonlinearPattern, ext::set < common::ranked_symbol < SymbolType > >, component::Set, std::tuple < GeneralAlphabet, NonlinearAlphabet, BarSymbols >, common::ranked_symbol < SymbolType >, component::Value, std::tuple < SubtreeWildcard, VariablesBarSymbol > > ( std::move ( alphabet ), std::move ( nonlinearVariables ), std::move ( bars ), std::move ( subtreeWildcard ), std::move ( variablesBar ) ) {
390 setContent ( std::move ( data ) );
391}
392
393template < class SymbolType >
395}
396
397template < class SymbolType >
399}
400
401template < class SymbolType >
402PrefixRankedBarNonlinearPattern < SymbolType >::PrefixRankedBarNonlinearPattern ( SymbolType barBase, common::ranked_symbol < SymbolType > variablesBar, const RankedTree < SymbolType > & tree ) : PrefixRankedBarNonlinearPattern ( TreeAuxiliary::computeBars ( tree.getAlphabet ( ), barBase ) + ext::set < common::ranked_symbol < SymbolType > > { variablesBar }, variablesBar, alphabet::WildcardSymbol::instance < common::ranked_symbol < SymbolType > > ( ), { }, tree.getAlphabet ( ) + TreeAuxiliary::computeBars ( tree.getAlphabet ( ), barBase ) + ext::set < common::ranked_symbol < SymbolType > > { variablesBar, alphabet::WildcardSymbol::instance < common::ranked_symbol < SymbolType > > ( ) }, TreeAuxiliary::treeToPrefix ( tree.getContent ( ), alphabet::WildcardSymbol::instance < common::ranked_symbol < SymbolType > > ( ), { }, barBase, variablesBar ) ) {
403}
404
405template < class SymbolType >
406PrefixRankedBarNonlinearPattern < SymbolType >::PrefixRankedBarNonlinearPattern ( SymbolType barBase, common::ranked_symbol < SymbolType > variablesBar, const RankedPattern < SymbolType > & tree ) : PrefixRankedBarNonlinearPattern ( TreeAuxiliary::computeBars ( tree.getAlphabet ( ), barBase ) + ext::set < common::ranked_symbol < SymbolType > > { variablesBar }, variablesBar, tree.getSubtreeWildcard ( ), { }, tree.getAlphabet ( ) + TreeAuxiliary::computeBars ( tree.getAlphabet ( ), barBase ) + ext::set < common::ranked_symbol < SymbolType > > { variablesBar, tree.getSubtreeWildcard ( ) }, TreeAuxiliary::treeToPrefix ( tree.getContent ( ), tree.getSubtreeWildcard ( ), { }, barBase, variablesBar ) ) {
407}
408
409template < class SymbolType >
410PrefixRankedBarNonlinearPattern < SymbolType >::PrefixRankedBarNonlinearPattern ( SymbolType barBase, common::ranked_symbol < SymbolType > variablesBar, const RankedNonlinearPattern < SymbolType > & tree ) : PrefixRankedBarNonlinearPattern ( TreeAuxiliary::computeBars ( tree.getAlphabet ( ), barBase ) + ext::set < common::ranked_symbol < SymbolType > > { variablesBar }, variablesBar, tree.getSubtreeWildcard ( ), tree.getNonlinearVariables ( ), tree.getAlphabet ( ) + TreeAuxiliary::computeBars ( tree.getAlphabet ( ), barBase ) + ext::set < common::ranked_symbol < SymbolType > > { variablesBar, tree.getSubtreeWildcard ( ) } + tree.getNonlinearVariables ( ), TreeAuxiliary::treeToPrefix ( tree.getContent ( ), tree.getSubtreeWildcard ( ), tree.getNonlinearVariables ( ), barBase, variablesBar ) ) {
411}
412
413template < class SymbolType >
414PrefixRankedBarNonlinearPattern < SymbolType >::PrefixRankedBarNonlinearPattern ( const PrefixRankedBarTree < SymbolType > & tree ) : PrefixRankedBarNonlinearPattern ( tree.getBars ( ) + ext::set < common::ranked_symbol < SymbolType > > { alphabet::VariablesBarSymbol::instance < common::ranked_symbol < SymbolType > > ( ) }, alphabet::VariablesBarSymbol::instance < common::ranked_symbol < SymbolType > > ( ), alphabet::WildcardSymbol::instance < common::ranked_symbol < SymbolType > > ( ), { }, tree.getAlphabet ( ) + ext::set < common::ranked_symbol < SymbolType > > { alphabet::VariablesBarSymbol::instance < common::ranked_symbol < SymbolType > > ( ), alphabet::WildcardSymbol::instance < common::ranked_symbol < SymbolType > > ( ) }, tree.getContent ( ) ) {
415}
416
417template < class SymbolType >
418PrefixRankedBarNonlinearPattern < SymbolType >::PrefixRankedBarNonlinearPattern ( const PrefixRankedBarPattern < SymbolType > & tree ) : PrefixRankedBarNonlinearPattern ( tree.getBars ( ), tree.getVariablesBar ( ), tree.getSubtreeWildcard ( ), { }, tree.getAlphabet ( ), tree.getContent ( ) ) {
419}
420
421template < class SymbolType >
422PrefixRankedBarNonlinearPattern < SymbolType >::PrefixRankedBarNonlinearPattern ( const RankedTree < SymbolType > & tree ) : PrefixRankedBarNonlinearPattern ( alphabet::BarSymbol::instance < SymbolType > ( ), alphabet::VariablesBarSymbol::instance < common::ranked_symbol < SymbolType > > ( ), tree ) {
423}
424
425template < class SymbolType >
426PrefixRankedBarNonlinearPattern < SymbolType >::PrefixRankedBarNonlinearPattern ( const RankedPattern < SymbolType > & tree ) : PrefixRankedBarNonlinearPattern ( alphabet::BarSymbol::instance < SymbolType > ( ), alphabet::VariablesBarSymbol::instance < common::ranked_symbol < SymbolType > > ( ), tree ) {
427}
428
429template < class SymbolType >
430PrefixRankedBarNonlinearPattern < SymbolType >::PrefixRankedBarNonlinearPattern ( const RankedNonlinearPattern < SymbolType > & tree ) : PrefixRankedBarNonlinearPattern ( alphabet::BarSymbol::instance < SymbolType > ( ), alphabet::VariablesBarSymbol::instance < common::ranked_symbol < SymbolType > > ( ), tree ) {
431}
432
433template < class SymbolType >
435 return this->m_Data;
436}
437
438template < class SymbolType >
440 return std::move ( this->m_Data );
441}
442
443template < class SymbolType >
445 arityChecksum ( data );
446
447 ext::set < common::ranked_symbol < SymbolType > > minimalAlphabet ( data.begin ( ), data.end ( ) );
448 std::set_difference ( minimalAlphabet.begin ( ), minimalAlphabet.end ( ), getAlphabet ( ).begin ( ), getAlphabet ( ).end ( ), ext::callback_iterator ( [ ] ( const common::ranked_symbol < SymbolType > & ) {
449 throw TreeException ( "Input symbols not in the alphabet." );
450 } ) );
451
452 this->m_Data = std::move ( data );
453}
454
455template < class SymbolType >
457 struct Data {
458 int terminals;
459 int bars;
460 int types;
461 };
462
463 Data accRes = std::accumulate ( data.begin ( ), data.end ( ), Data { 1, 1, 0 }, [ * this ] ( const Data & current, const common::ranked_symbol < SymbolType > & symbol ) {
464 if ( getBars ( ).contains ( symbol ) || symbol == getVariablesBar ( ) )
465 return Data { current.terminals, static_cast < int > ( current.bars + symbol.getRank ( ) - 1 ), current.types - 1 };
466 else
467 return Data { static_cast < int > ( current.terminals + symbol.getRank ( ) - 1 ), current.bars, current.types + 1 };
468 } );
469
470 if ( accRes.terminals != 0 || accRes.bars != 0 || accRes.types != 0 )
471 throw TreeException ( "The string does not form a tree" );
472
473 for ( unsigned i = 1; i < data.size ( ); ++ i ) {
474 if ( data [ i - 1 ] == getSubtreeWildcard ( ) && data [ i ] != getVariablesBar ( ) )
475 throw TreeException ( "Inconsystency of SubtreeWildcard and variablesBar" );
476
477 if ( getNonlinearVariables ( ).contains ( data [ i - 1 ] ) && data [ i ] != getVariablesBar ( ) )
478 throw TreeException ( "Inconsystency of NonlinearVariables and variablesBar" );
479 }
480}
481
482template < class SymbolType >
484 return this->m_Data.empty ( );
485}
486
487} /* namespace tree */
488
489namespace core {
490
496template < class SymbolType >
497class SetConstraint< tree::PrefixRankedBarNonlinearPattern < SymbolType >, common::ranked_symbol < SymbolType >, tree::GeneralAlphabet > {
498public:
509
510 return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ) || pattern.template accessComponent < tree::VariablesBarSymbol > ( ).get ( ) == symbol || pattern.template accessComponent < tree::BarSymbols > ( ).get ( ).count ( symbol ) || pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol;
511 }
512
522 return true;
523 }
524
532 }
533};
534
540template < class SymbolType >
541class SetConstraint< tree::PrefixRankedBarNonlinearPattern < SymbolType >, common::ranked_symbol < SymbolType >, tree::BarSymbols > {
542public:
553
554 return std::find ( content.begin ( ), content.end ( ), symbol ) != content.end ( ) || pattern.template accessComponent < tree::VariablesBarSymbol > ( ).get ( ) == symbol;
555 }
556
566 return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol );
567 }
568
576 }
577};
578
584template < class SymbolType >
585class SetConstraint< tree::PrefixRankedBarNonlinearPattern < SymbolType >, common::ranked_symbol < SymbolType >, tree::NonlinearAlphabet > {
586public:
596 return false;
597 }
598
608 return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol );
609 }
610
620 if ( symbol.getRank ( ) != 0 )
621 throw tree::TreeException ( "Nonlinear variable has nonzero arity" );
622
623 if ( pattern.template accessComponent < tree::SubtreeWildcard > ( ).get ( ) == symbol )
624 throw tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as nonlinear variable since it is already subtree wildcard" );
625 }
626};
627
633template < class SymbolType >
634class ElementConstraint< tree::PrefixRankedBarNonlinearPattern < SymbolType >, common::ranked_symbol < SymbolType >, tree::SubtreeWildcard > {
635public:
645 return pattern.template accessComponent < tree::GeneralAlphabet > ( ).get ( ).count ( symbol );
646 }
647
657 if ( symbol.getRank ( ) != 0 )
658 throw tree::TreeException ( "SubtreeWildcard symbol has nonzero arity" );
659
660 if ( pattern.template accessComponent < tree::NonlinearAlphabet > ( ).get ( ).count ( symbol ) )
661 throw tree::TreeException ( "Symbol " + ext::to_string ( symbol ) + "cannot be set as subtree wildcard since it is already nonlinear variable" );
662 }
663};
664
670template < class SymbolType >
671class ElementConstraint< tree::PrefixRankedBarNonlinearPattern < SymbolType >, common::ranked_symbol < SymbolType >, tree::VariablesBarSymbol > {
672public:
682 return pattern.template accessComponent < tree::BarSymbols > ( ).get ( ).count ( symbol );
683 }
684
694 if ( symbol.getRank ( ) != 0 )
695 throw tree::TreeException ( "VariablesBarSymbol has nonzero arity" );
696 }
697};
698
704template < class SymbolType >
705struct normalize < tree::PrefixRankedBarNonlinearPattern < SymbolType > > {
707 common::ranked_symbol < DefaultSymbolType > variablesBars = alphabet::SymbolNormalize::normalizeRankedSymbol ( std::move ( value ).getVariablesBar ( ) );
708 common::ranked_symbol < DefaultSymbolType > wildcard = alphabet::SymbolNormalize::normalizeRankedSymbol ( std::move ( value ).getSubtreeWildcard ( ) );
709 ext::set < common::ranked_symbol < DefaultSymbolType > > nonlinearAlphabet = alphabet::SymbolNormalize::normalizeRankedAlphabet ( std::move ( value ).getNonlinearVariables ( ) );
713
714 return tree::PrefixRankedBarNonlinearPattern < > ( std::move ( bars ), std::move ( variablesBars ), std::move ( wildcard ), std::move ( nonlinearAlphabet ), std::move ( alphabet ), std::move ( content ) );
715 }
716};
717
718} /* namespace core */
719
721
static ext::vector< common::ranked_symbol< DefaultSymbolType > > normalizeRankedSymbols(ext::vector< common::ranked_symbol< SymbolType > > &&symbols)
Definition: SymbolNormalize.h:113
static common::ranked_symbol< DefaultSymbolType > normalizeRankedSymbol(common::ranked_symbol< SymbolType > &&symbol)
Definition: SymbolNormalize.h:81
static ext::set< common::ranked_symbol< DefaultSymbolType > > normalizeRankedAlphabet(ext::set< common::ranked_symbol< SymbolType > > &&symbols)
Definition: SymbolNormalize.h:59
static Base instance()
Factory for the symbol construction of the symbol based on given type.
Definition: WildcardSymbol.h:83
Definition: ranked_symbol.hpp:20
const size_t & getRank() const &
Definition: ranked_symbol.hpp:83
Definition: components.hpp:181
static bool available(const tree::PrefixRankedBarNonlinearPattern< SymbolType > &pattern, const common::ranked_symbol< SymbolType > &symbol)
Definition: PrefixRankedBarNonlinearPattern.h:644
static void valid(const tree::PrefixRankedBarNonlinearPattern< SymbolType > &pattern, const common::ranked_symbol< SymbolType > &symbol)
Definition: PrefixRankedBarNonlinearPattern.h:656
static bool available(const tree::PrefixRankedBarNonlinearPattern< SymbolType > &pattern, const common::ranked_symbol< SymbolType > &symbol)
Definition: PrefixRankedBarNonlinearPattern.h:681
static void valid(const tree::PrefixRankedBarNonlinearPattern< SymbolType > &, const common::ranked_symbol< SymbolType > &symbol)
Definition: PrefixRankedBarNonlinearPattern.h:693
Definition: components.hpp:25
static bool used(const tree::PrefixRankedBarNonlinearPattern< SymbolType > &, const common::ranked_symbol< SymbolType > &)
Definition: PrefixRankedBarNonlinearPattern.h:595
static bool available(const tree::PrefixRankedBarNonlinearPattern< SymbolType > &pattern, const common::ranked_symbol< SymbolType > &symbol)
Definition: PrefixRankedBarNonlinearPattern.h:607
static void valid(const tree::PrefixRankedBarNonlinearPattern< SymbolType > &pattern, const common::ranked_symbol< SymbolType > &symbol)
Definition: PrefixRankedBarNonlinearPattern.h:619
static void valid(const tree::PrefixRankedBarNonlinearPattern< SymbolType > &, const common::ranked_symbol< SymbolType > &)
Definition: PrefixRankedBarNonlinearPattern.h:531
static bool used(const tree::PrefixRankedBarNonlinearPattern< SymbolType > &pattern, const common::ranked_symbol< SymbolType > &symbol)
Definition: PrefixRankedBarNonlinearPattern.h:507
static bool available(const tree::PrefixRankedBarNonlinearPattern< SymbolType > &, const common::ranked_symbol< SymbolType > &)
Definition: PrefixRankedBarNonlinearPattern.h:521
static bool available(const tree::PrefixRankedBarNonlinearPattern< SymbolType > &pattern, const common::ranked_symbol< SymbolType > &symbol)
Definition: PrefixRankedBarNonlinearPattern.h:565
static void valid(const tree::PrefixRankedBarNonlinearPattern< SymbolType > &, const common::ranked_symbol< SymbolType > &)
Definition: PrefixRankedBarNonlinearPattern.h:575
static bool used(const tree::PrefixRankedBarNonlinearPattern< SymbolType > &pattern, const common::ranked_symbol< SymbolType > &symbol)
Definition: PrefixRankedBarNonlinearPattern.h:551
Definition: setComponents.hpp:26
Output iterator calling a callback function on assignment.
Definition: iterator.hpp:923
Definition: ostream.h:14
Definition: set.hpp:44
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
Nonlinear tree pattern represented as linear sequece as result of preorder traversal with additional ...
Definition: PrefixRankedBarNonlinearPattern.h:91
friend ext::ostream & operator<<(ext::ostream &out, const PrefixRankedBarNonlinearPattern &instance)
Definition: PrefixRankedBarNonlinearPattern.h:366
const ext::set< common::ranked_symbol< SymbolType > > & getBars() const &
Definition: PrefixRankedBarNonlinearPattern.h:232
bool operator==(const PrefixRankedBarNonlinearPattern &other) const
Definition: PrefixRankedBarNonlinearPattern.h:354
PrefixRankedBarNonlinearPattern(ext::set< common::ranked_symbol< SymbolType > > bars, common::ranked_symbol< SymbolType > variablesBar, common::ranked_symbol< SymbolType > subtreeWildcard, ext::set< common::ranked_symbol< SymbolType > > nonlinearVariables, ext::set< common::ranked_symbol< SymbolType > > alphabet, ext::vector< common::ranked_symbol< SymbolType > > data)
Creates a new instance of the pattern with concrete alphabet, bars, content, wildcard,...
Definition: PrefixRankedBarNonlinearPattern.h:389
void setContent(ext::vector< common::ranked_symbol< SymbolType > > data)
Definition: PrefixRankedBarNonlinearPattern.h:444
bool isEmpty() const
Definition: PrefixRankedBarNonlinearPattern.h:483
void extendAlphabet(const ext::set< common::ranked_symbol< SymbolType > > &symbols)
Definition: PrefixRankedBarNonlinearPattern.h:223
common::ranked_symbol< SymbolType > && getVariablesBar() &&
Definition: PrefixRankedBarNonlinearPattern.h:304
ext::set< common::ranked_symbol< SymbolType > > && getAlphabet() &&
Definition: PrefixRankedBarNonlinearPattern.h:214
const ext::set< common::ranked_symbol< SymbolType > > & getNonlinearVariables() const &
Definition: PrefixRankedBarNonlinearPattern.h:277
const common::ranked_symbol< SymbolType > & getSubtreeWildcard() const &
Definition: PrefixRankedBarNonlinearPattern.h:259
void extendBars(const ext::set< common::ranked_symbol< SymbolType > > &bars)
Definition: PrefixRankedBarNonlinearPattern.h:250
ext::set< common::ranked_symbol< SymbolType > > && getBars() &&
Definition: PrefixRankedBarNonlinearPattern.h:241
ext::set< common::ranked_symbol< SymbolType > > && getNonlinearVariables() &&
Definition: PrefixRankedBarNonlinearPattern.h:286
common::ranked_symbol< SymbolType > && getSubtreeWildcard() &&
Definition: PrefixRankedBarNonlinearPattern.h:268
const ext::set< common::ranked_symbol< SymbolType > > & getAlphabet() const &
Definition: PrefixRankedBarNonlinearPattern.h:205
const ext::vector< common::ranked_symbol< SymbolType > > & getContent() const &
Definition: PrefixRankedBarNonlinearPattern.h:434
const common::ranked_symbol< SymbolType > & getVariablesBar() const &
Definition: PrefixRankedBarNonlinearPattern.h:295
Tree pattern represented as linear sequece as result of preorder traversal with additional bar symbol...
Definition: PrefixRankedBarPattern.h:85
Tree structure represented as linear sequece as result of preorder traversal with additional bar symb...
Definition: PrefixRankedBarTree.h:78
Nonlinear tree pattern represented in its natural representation. The representation is so called ran...
Definition: RankedNonlinearPattern.h:74
Tree pattern represented in its natural representation. The representation is so called ranked,...
Definition: RankedPattern.h:72
Tree structure represented in its natural representation. The representation is so called ranked,...
Definition: RankedTree.h:72
static ext::set< common::ranked_symbol< SymbolType > > computeBars(const ext::set< common::ranked_symbol< SymbolType > > &alphabet, const SymbolType &barBase)
Definition: TreeAuxiliary.h:89
static ext::vector< common::ranked_symbol< SymbolType > > treeToPrefix(const ext::tree< common::ranked_symbol< SymbolType > > &tree)
Definition: TreeAuxiliary.h:185
Definition: TreeException.h:15
Definition: BarSymbol.cpp:12
int i
Definition: AllEpsilonClosure.h:118
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
bool contains(InputIt first, InputIt last, const Element &elem)
Linear version of search in a range of values.
Definition: algorithm.hpp:170
std::string to_string(const T &value)
To string method designated for objects that can be casted to string.
Definition: string.hpp:131
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::PrefixRankedBarNonlinearPattern< > eval(tree::PrefixRankedBarNonlinearPattern< SymbolType > &&value)
Definition: PrefixRankedBarNonlinearPattern.h:706
Definition: normalize.hpp:13