Drake
RewritingRule Class Reference

A RewritingRule, lhs => rhs, consists of two Patterns lhs and rhs. More...

#include <drake/common/symbolic_simplification.h>

Public Member Functions

 RewritingRule (Pattern lhs, Pattern rhs)
 Constructs a rewriting rule lhs => rhs. More...
 
 RewritingRule (const RewritingRule &)=default
 Default copy constructor. More...
 
 RewritingRule (RewritingRule &&)=default
 Default move constructor. More...
 
RewritingRuleoperator= (const RewritingRule &)=delete
 Deleted copy-assign operator. More...
 
RewritingRuleoperator= (RewritingRule &&)=delete
 Deleted move-assign operator. More...
 
 ~RewritingRule ()=default
 Default destructor. More...
 
const Patternlhs () const
 Returns the const reference of the LHS of the rewriting rule. More...
 
const Patternrhs () const
 Returns the const reference of the RHS of the rewriting rule. More...
 

Detailed Description

A RewritingRule, lhs => rhs, consists of two Patterns lhs and rhs.

A rewriting rule instructs a rewriter how to transform a given expression e. First, the rewriter tries to find a match between the expression e and the pattern lhs. If such a match is found, it applies the match result (substitution) to rhs. Otherwise, the same expression e is returned.

Constructor & Destructor Documentation

◆ RewritingRule() [1/3]

RewritingRule ( Pattern  lhs,
Pattern  rhs 
)
inline

Constructs a rewriting rule lhs => rhs.

◆ RewritingRule() [2/3]

RewritingRule ( const RewritingRule )
default

Default copy constructor.

◆ RewritingRule() [3/3]

RewritingRule ( RewritingRule &&  )
default

Default move constructor.

◆ ~RewritingRule()

~RewritingRule ( )
default

Default destructor.

Member Function Documentation

◆ lhs()

const Pattern& lhs ( ) const
inline

Returns the const reference of the LHS of the rewriting rule.

◆ operator=() [1/2]

RewritingRule& operator= ( const RewritingRule )
delete

Deleted copy-assign operator.

◆ operator=() [2/2]

RewritingRule& operator= ( RewritingRule &&  )
delete

Deleted move-assign operator.

◆ rhs()

const Pattern& rhs ( ) const
inline

Returns the const reference of the RHS of the rewriting rule.


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