Cadabra
Computer algebra system for field theory problems
Public Member Functions | Public Attributes | List of all members
cadabra::pattern Class Reference

#include <Props.hh>

Public Member Functions

 pattern ()
 
 pattern (const Ex &)
 
bool match (const Properties &, const Ex::iterator &, bool ignore_parent_rel=false, bool ignore_properties=false) const
 Match a pattern to an expression. More...
 
bool children_wildcard () const
 
bool match_ext (const Properties &, const Ex::iterator &, Ex_comparator &comp, bool ignore_parent_rel=false, bool ignore_properties=false) const
 As match, but using a comparator object which is externally provided, so that the caller can use the found pattern map. More...
 

Public Attributes

Ex obj
 

Constructor & Destructor Documentation

◆ pattern() [1/2]

pattern::pattern ( )

◆ pattern() [2/2]

pattern::pattern ( const Ex o)

Member Function Documentation

◆ children_wildcard()

bool pattern::children_wildcard ( ) const

◆ match()

bool pattern::match ( const Properties properties,
const Ex::iterator &  it,
bool  ignore_parent_rel = false,
bool  ignore_properties = false 
) const

Match a pattern to an expression.

If ignore_parent_rel is true, this will match regardless of the parent_rel of the top node. If ignore_properties is true, property information will not be used to match symbols anywhere (in which case A_{a} and A_{b} will no longer match even when 'a' and 'b' have the same Indices property, for example). The latter feature is mostly used to do pattern matching when the property for which we need it cannot rely on such child node properties, e.g. Accent; see the specialisation in get below.

◆ match_ext()

bool pattern::match_ext ( const Properties properties,
const Ex::iterator &  it,
Ex_comparator comp,
bool  ignore_parent_rel = false,
bool  ignore_properties = false 
) const

As match, but using a comparator object which is externally provided, so that the caller can use the found pattern map.

Member Data Documentation

◆ obj

Ex cadabra::pattern::obj

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