Sundance::AssociateHungryDiffOpWithOperand Class Reference

Transform a product by associating any hungry diff op in the left operand with the right operand:

\[ (u D_x) v \rightarrow u D_x u \]

. More...

Inheritance diagram for Sundance::AssociateHungryDiffOpWithOperand:

Sundance::ProductTransformation Sundance::SymbolicTransformation Sundance::ObjectWithClassVerbosity< SymbolicTransformation > Playa::ObjectWithVerbosity

List of all members.

Public Member Functions

 AssociateHungryDiffOpWithOperand ()
virtual ~AssociateHungryDiffOpWithOperand ()
virtual bool doTransform (const RCP< ScalarExpr > &left, const RCP< ScalarExpr > &right, RCP< ScalarExpr > &rtn) const
 Test whether the transform is applicable in this case, and if it is, apply it.


Detailed Description

Transform a product by associating any hungry diff op in the left operand with the right operand:

\[ (u D_x) v \rightarrow u D_x u \]

.

Definition at line 204 of file SundanceStdProductTransformations.hpp.


Constructor & Destructor Documentation

Sundance::AssociateHungryDiffOpWithOperand::AssociateHungryDiffOpWithOperand (  )  [inline]

Definition at line 208 of file SundanceStdProductTransformations.hpp.

virtual Sundance::AssociateHungryDiffOpWithOperand::~AssociateHungryDiffOpWithOperand (  )  [inline, virtual]

Definition at line 211 of file SundanceStdProductTransformations.hpp.


Member Function Documentation

bool AssociateHungryDiffOpWithOperand::doTransform ( const RCP< ScalarExpr > &  left,
const RCP< ScalarExpr > &  right,
RCP< ScalarExpr > &  rtn 
) const [virtual]

Test whether the transform is applicable in this case, and if it is, apply it.

The return value is true is the transformation was applied, otherwise false. Returns by non-const reference the transformed expression.

Implements Sundance::ProductTransformation.

Definition at line 315 of file SundanceStdProductTransformations.cpp.

References Sundance::SymbolicTransformation::getScalar(), Sundance::Expr::handle(), Sundance::BinaryExpr::left(), Playa::Out::println(), Sundance::BinaryExpr::right(), SUNDANCE_OUT, and Playa::ObjectWithVerbosity::verb().

Site Contact