Sundance::FunctionalPolynomial Class Reference

Inheritance diagram for Sundance::FunctionalPolynomial:

Sundance::EvaluatableExpr Sundance::ScalarExpr Sundance::EvaluatorFactory Sundance::FuncSetAccumulator Sundance::ObjectWithClassVerbosity< EvaluatableExpr > Sundance::ExprBase Playa::ObjectWithVerbosity Playa::Handleable< ExprBase >

List of all members.

Public Member Functions

 FunctionalPolynomial (const RCP< ScalarExpr > &expr)
 FunctionalPolynomial (const Map< int, RCP< ScalarExpr > > &funcs, const Map< int, Set< MultiIndex > > &funcMultiIndices, const Array< Map< MultipleDeriv, RCP< ScalarExpr > > > &coeffs)
virtual ~FunctionalPolynomial ()
virtual Set< MultipleDerivinternalFindW (int order, const EvalContext &context) const
virtual RCP< ExprBasegetRcp ()
virtual EvaluatorcreateEvaluator (const EvaluatableExpr *expr, const EvalContext &context) const
RCP< FunctionalPolynomialaddPoly (const FunctionalPolynomial *other, int sign) const
RCP< FunctionalPolynomialmultiplyPoly (const FunctionalPolynomial *other) const
RCP< FunctionalPolynomialmultiplyScalar (const RCP< ScalarExpr > &alpha) const
RCP< FunctionalPolynomialaddFunction (const RCP< ScalarExpr > &u, int sign) const
virtual std::ostream & toText (std::ostream &os, bool paren) const
virtual XMLObject toXML () const
virtual bool lessThan (const ScalarExpr *other) const

Static Public Member Functions

static bool isConvertibleToPoly (const ScalarExpr *expr)
static RCP< FunctionalPolynomialtoPoly (const RCP< ScalarExpr > &expr)

Private Member Functions

Set< DerivfindFuncsForSummation (const Set< MultipleDeriv > &prevSet, const MultipleDeriv &thisSet) const
MultipleDeriv successorTerm (const MultipleDeriv &md) const
void stepRecurrence (int level, const Map< MultipleDeriv, std::string > &sPrev, Map< MultipleDeriv, std::string > &sCurr) const
std::string evalString () const

Private Attributes

Map< int, RCP< ScalarExpr > > funcs_
Map< int, Set< MultiIndex > > funcMultiIndices_
Array< Map< MultipleDeriv, RCP
< ScalarExpr > > > 
Array< Set< MultipleDeriv > > keys_

Detailed Description

Specialized class for representing polynomials in symbolic functions and their derivatives.

Definition at line 50 of file SundanceFunctionalPolynomial.hpp.

Constructor & Destructor Documentation

FunctionalPolynomial::FunctionalPolynomial ( const RCP< ScalarExpr > &  expr  ) 

FunctionalPolynomial::FunctionalPolynomial ( const Map< int, RCP< ScalarExpr > > &  funcs,
const Map< int, Set< MultiIndex > > &  funcMultiIndices,
const Array< Map< MultipleDeriv, RCP< ScalarExpr > > > &  coeffs 


Definition at line 105 of file SundanceFunctionalPolynomial.cpp.

References coeffs_, and keys_.

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

virtual destructor

Definition at line 61 of file SundanceFunctionalPolynomial.hpp.

Member Function Documentation

RCP< FunctionalPolynomial > FunctionalPolynomial::addFunction ( const RCP< ScalarExpr > &  u,
int  sign 
) const

Definition at line 273 of file SundanceFunctionalPolynomial.cpp.

References addPoly(), and FunctionalPolynomial().

RCP< FunctionalPolynomial > FunctionalPolynomial::addPoly ( const FunctionalPolynomial other,
int  sign 
) const

Evaluator * FunctionalPolynomial::createEvaluator ( const EvaluatableExpr expr,
const EvalContext context 
) const [virtual]

Implements Sundance::EvaluatorFactory.

Definition at line 311 of file SundanceFunctionalPolynomial.cpp.

string FunctionalPolynomial::evalString (  )  const [private]

Definition at line 491 of file SundanceFunctionalPolynomial.cpp.

References coeffs_, Playa::Out::os(), and stepRecurrence().

Referenced by toText().

Set< Deriv > FunctionalPolynomial::findFuncsForSummation ( const Set< MultipleDeriv > &  prevSet,
const MultipleDeriv thisSet 
) const [private]

virtual RCP<ExprBase> Sundance::FunctionalPolynomial::getRcp (  )  [inline, virtual]

Implements Playa::Handleable< ExprBase >.

Definition at line 71 of file SundanceFunctionalPolynomial.hpp.

Set< MultipleDeriv > FunctionalPolynomial::internalFindW ( int  order,
const EvalContext context 
) const [virtual]

Implements Sundance::EvaluatableExpr.

Definition at line 128 of file SundanceFunctionalPolynomial.cpp.

bool FunctionalPolynomial::isConvertibleToPoly ( const ScalarExpr expr  )  [static]

bool FunctionalPolynomial::lessThan ( const ScalarExpr other  )  const [virtual]

Ordering operator for use in transforming exprs to standard form

Implements Sundance::ScalarExpr.

Definition at line 522 of file SundanceFunctionalPolynomial.cpp.

RCP< FunctionalPolynomial > FunctionalPolynomial::multiplyPoly ( const FunctionalPolynomial other  )  const

RCP< FunctionalPolynomial > FunctionalPolynomial::multiplyScalar ( const RCP< ScalarExpr > &  alpha  )  const

void FunctionalPolynomial::stepRecurrence ( int  level,
const Map< MultipleDeriv, std::string > &  sPrev,
Map< MultipleDeriv, std::string > &  sCurr 
) const [private]

MultipleDeriv FunctionalPolynomial::successorTerm ( const MultipleDeriv md  )  const [private]

Given a term's key, find the term that will appear as its successor in the evaluation recurrence.

Definition at line 416 of file SundanceFunctionalPolynomial.cpp.

References Sundance::MultiSet< Key >::put().

RCP< FunctionalPolynomial > FunctionalPolynomial::toPoly ( const RCP< ScalarExpr > &  expr  )  [static]

std::ostream & FunctionalPolynomial::toText ( std::ostream &  os,
bool  paren 
) const [virtual]

Write a simple text description suitable for output to a terminal

Implements Sundance::ExprBase.

Definition at line 347 of file SundanceFunctionalPolynomial.cpp.

References evalString().

XMLObject FunctionalPolynomial::toXML (  )  const [virtual]

Write in XML

Implements Sundance::ExprBase.

Definition at line 354 of file SundanceFunctionalPolynomial.cpp.

References coeffs_, Sundance::Expr::handle(), and Sundance::Expr::toXML().

Member Data Documentation

Definition at line 120 of file SundanceFunctionalPolynomial.hpp.

Referenced by FunctionalPolynomial().

Site Contact