Drake
Drake C++ Documentation
Loading...
Searching...
No Matches
RewritingRule Class Reference

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.

#include <drake/common/symbolic/simplification.h>

Public Member Functions

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

Constructor & Destructor Documentation

◆ RewritingRule() [1/3]

RewritingRule ( Pattern lhs,
Pattern rhs )

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

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

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


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