Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

Derivative.h

Go to the documentation of this file.
00001 #ifndef DERIVATIVE_H
00002 #define DERIVATIVE_H
00003 
00004 #include "SundanceDefs.h"
00005 
00006 #include "Expr.h"
00007 #include "MultiIndex.h"
00008 
00009 
00010 namespace Sundance
00011 {
00012 
00013   using namespace TSF;
00014   using std::string;
00015 
00016   using std::ostream;
00017 
00018   /**
00019    * \ingroup UserLevelSymbolics
00020    * Differentiation operator.
00021    */
00022 
00023   class Derivative : public ExprBase
00024     {
00025     public:
00026       /** \name User-level methods */
00027       //@{
00028       /** Construct a differentiation operator of a given direction and order */
00029       Derivative(int direction, int order = 1);
00030       //@}
00031 
00032       /** \name Developer-only methods */
00033       //@{
00034       /** Construct with a multiindex specifying order and direction */
00035       Derivative(const MultiIndex& d) : d_(d) {;}
00036 
00037       /** return the multiindex that specifies the order and direction of
00038        * this derivative operator
00039        */
00040       const MultiIndex& multiIndex() const {return d_;}
00041 
00042 
00043       // ordering support
00044       /** */
00045       virtual int sortPriority() const {return DERIVATIVE;}
00046       /** */
00047       virtual bool operator==(const Expr& other) const ;
00048       /** */
00049       virtual bool operator<(const Expr& other) const ;
00050 
00051       // RTTI
00052       /** */
00053       virtual bool isDerivative() const {return true;}
00054 
00055       // miscellany
00056       /** */
00057       virtual ExprBase* clone() const ;
00058       /** */
00059       virtual void print(ostream& os, bool paren=false) const ;
00060       //@}
00061     private:
00062       MultiIndex d_;
00063     };
00064 
00065 }
00066 #endif
00067 
00068 
00069 
00070 
00071 
00072 

Contact:
Kevin Long (krlong@ca.sandia.gov)


Documentation generated by