Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Static Public Member Functions
core::ElementConstraint< tree::UnrankedExtendedPattern< SymbolType >, SymbolType, tree::SubtreeGap > Class Template Reference

#include <UnrankedExtendedPattern.h>

Static Public Member Functions

static bool available (const tree::UnrankedExtendedPattern< SymbolType > &pattern, const SymbolType &symbol)
 
static void valid (const tree::UnrankedExtendedPattern< SymbolType > &, const SymbolType &)
 

Detailed Description

template<class SymbolType>
class core::ElementConstraint< tree::UnrankedExtendedPattern< SymbolType >, SymbolType, tree::SubtreeGap >

Helper class specifying constraints for the pattern's internal subtree wildcard element.

Template Parameters
SymbolTypeused for the symbol of the alphabet

Member Function Documentation

◆ available()

template<class SymbolType >
static bool core::ElementConstraint< tree::UnrankedExtendedPattern< SymbolType >, SymbolType, tree::SubtreeGap >::available ( const tree::UnrankedExtendedPattern< SymbolType > &  pattern,
const SymbolType &  symbol 
)
inlinestatic

Determines whether the symbol is available in the pattern's alphabet.

Parameters
patternthe tested pattern
symbolthe tested symbol
Returns
true if the symbol is already in the alphabet of the pattern

◆ valid()

template<class SymbolType >
static void core::ElementConstraint< tree::UnrankedExtendedPattern< SymbolType >, SymbolType, tree::SubtreeGap >::valid ( const tree::UnrankedExtendedPattern< SymbolType > &  ,
const SymbolType &   
)
inlinestatic

Subtree wildcard needs to have zero arity and it needs to be different from any nonlinear variable of the tree.

Parameters
patternthe tested pattern
symbolthe tested symbol
Exceptions
TreeExceptionif the symbol does not have zero arity

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