COPASI API  4.16.103
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
CNormalFunction Class Reference

#include <CNormalFunction.h>

Inheritance diagram for CNormalFunction:
Inheritance graph
[legend]
Collaboration diagram for CNormalFunction:
Collaboration graph
[legend]

Public Types

enum  Type {
  LOG = 0, LOG10, EXP, SIN,
  COS, TAN, SEC, CSC,
  COT, SINH, COSH, TANH,
  SECH, CSCH, COTH, ARCSIN,
  ARCCOS, ARCTAN, ARCSEC, ARCCSC,
  ARCCOT, ARCSINH, ARCCOSH, ARCTANH,
  ARCSECH, ARCCSCH, ARCCOTH, SQRT,
  ABS, FLOOR, CEIL, FACTORIAL,
  INVALID
}
 

Public Member Functions

 CNormalFunction ()
 
 CNormalFunction (const CNormalFunction &src)
 
virtual CNormalBasecopy () const
 
CNormalFractiongetFraction ()
 
const CNormalFractiongetFraction () const
 
Type getType () const
 
bool operator< (const CNormalFunction &src) const
 
CNormalFunctionoperator= (const CNormalFunction &src)
 
bool operator== (const CNormalFunction &src) const
 
void setFraction (const CNormalFraction &frac)
 
void setType (Type type)
 
virtual bool simplify ()
 
virtual std::string toString () const
 
virtual ~CNormalFunction ()
 
- Public Member Functions inherited from CNormalBase
virtual bool areEqual (const CNormalBase &rhs) const
 
virtual ~CNormalBase ()
 

Static Public Attributes

static const char * NAMES []
 

Protected Attributes

CNormalFractionmpFraction
 
Type mType
 

Detailed Description

Definition at line 28 of file CNormalFunction.h.

Member Enumeration Documentation

Enumerator
LOG 
LOG10 
EXP 
SIN 
COS 
TAN 
SEC 
CSC 
COT 
SINH 
COSH 
TANH 
SECH 
CSCH 
COTH 
ARCSIN 
ARCCOS 
ARCTAN 
ARCSEC 
ARCCSC 
ARCCOT 
ARCSINH 
ARCCOSH 
ARCTANH 
ARCSECH 
ARCCSCH 
ARCCOTH 
SQRT 
ABS 
FLOOR 
CEIL 
FACTORIAL 
INVALID 

Definition at line 31 of file CNormalFunction.h.

32  {
33  LOG = 0,
34  LOG10,
35  EXP,
36  SIN,
37  COS,
38  TAN,
39 #ifdef SEC
40 # undef SEC
41 #endif
42  SEC,
43  CSC,
44  COT,
45  SINH,
46  COSH,
47  TANH,
48  SECH,
49  CSCH,
50  COTH,
51  ARCSIN,
52  ARCCOS,
53  ARCTAN,
54  ARCSEC,
55  ARCCSC,
56  ARCCOT,
57  ARCSINH,
58  ARCCOSH,
59  ARCTANH,
60  ARCSECH,
61  ARCCSCH,
62  ARCCOTH,
63  SQRT,
64  ABS,
65  FLOOR,
66  CEIL,
67  FACTORIAL,
68  INVALID
69  };

Constructor & Destructor Documentation

CNormalFunction::CNormalFunction ( )

Definition at line 65 of file CNormalFunction.cpp.

Referenced by copy().

CNormalFunction::CNormalFunction ( const CNormalFunction src)

Definition at line 68 of file CNormalFunction.cpp.

69 {}
CNormalFraction * mpFraction
Type getType() const
CNormalFraction & getFraction()
CNormalFunction::~CNormalFunction ( )
virtual

Definition at line 71 of file CNormalFunction.cpp.

References mpFraction.

72 {
73  if (this->mpFraction != NULL) delete mpFraction;
74 }
CNormalFraction * mpFraction

Member Function Documentation

CNormalBase * CNormalFunction::copy ( ) const
virtual

Implements CNormalBase.

Definition at line 152 of file CNormalFunction.cpp.

References CNormalFunction().

153  {
154  return new CNormalFunction(*this);
155  }
CNormalFraction & CNormalFunction::getFraction ( )

Definition at line 104 of file CNormalFunction.cpp.

References mpFraction.

Referenced by convertToCEvaluationNode(), normalize_variable_names(), and operator=().

105 {
106  return *mpFraction;
107 }
CNormalFraction * mpFraction
const CNormalFraction & CNormalFunction::getFraction ( ) const

Definition at line 109 of file CNormalFunction.cpp.

References mpFraction.

110  {
111  return *mpFraction;
112  }
CNormalFraction * mpFraction
CNormalFunction::Type CNormalFunction::getType ( ) const

Definition at line 94 of file CNormalFunction.cpp.

References mType.

Referenced by convertToCEvaluationNode(), and operator=().

95  {
96  return this->mType;
97  }
bool CNormalFunction::operator< ( const CNormalFunction src) const

Definition at line 131 of file CNormalFunction.cpp.

References mpFraction, and mType.

132  {
133  bool result = false;
134  if (this->mType < rhs.mType)
135  {
136  result = true;
137  }
138  else if (this->mType == rhs.mType)
139  {
140  result = (*this->mpFraction) < (*rhs.mpFraction);
141  }
142  return result;
143  }
CNormalFraction * mpFraction
CNormalFunction & CNormalFunction::operator= ( const CNormalFunction src)

Definition at line 76 of file CNormalFunction.cpp.

References getFraction(), getType(), mpFraction, and mType.

77 {
78  if (this->mpFraction != NULL) delete this->mpFraction;
79  this->mpFraction = new CNormalFraction(src.getFraction());
80  this->mType = src.getType();
81  return *this;
82 }
CNormalFraction * mpFraction
Type getType() const
CNormalFraction & getFraction()
bool CNormalFunction::operator== ( const CNormalFunction src) const

Definition at line 126 of file CNormalFunction.cpp.

References mpFraction, and mType.

127  {
128  return ((this->mType == rhs.mType) && (*this->mpFraction) == (*rhs.mpFraction));
129  }
void CNormalFunction::setFraction ( const CNormalFraction frac)

Definition at line 114 of file CNormalFunction.cpp.

References mpFraction.

Referenced by createFunction().

115 {
116  if (this->mpFraction != NULL) delete this->mpFraction;
117  this->mpFraction = new CNormalFraction(frac);
118 }
CNormalFraction * mpFraction
void CNormalFunction::setType ( CNormalFunction::Type  type)

Definition at line 99 of file CNormalFunction.cpp.

References mType.

Referenced by createFunction().

100 {
101  this->mType = type;
102 }
bool CNormalFunction::simplify ( )
virtual

Implements CNormalBase.

Definition at line 145 of file CNormalFunction.cpp.

References mpFraction, and CNormalFraction::simplify().

146 {
147  bool result = true;
148  if (this->mpFraction != NULL) result = this->mpFraction->simplify();
149  return result;
150 }
virtual bool simplify()
CNormalFraction * mpFraction
std::string CNormalFunction::toString ( ) const
virtual

Implements CNormalBase.

Definition at line 84 of file CNormalFunction.cpp.

References INVALID, mpFraction, mType, and NAMES.

Referenced by operator<<().

85  {
86  std::ostringstream s;
87  if (this->mType != INVALID && this->mpFraction != NULL)
88  {
89  s << CNormalFunction::NAMES[this->mType] << "(" << *this->mpFraction << ")";
90  }
91  return s.str();
92  }
static const char * NAMES[]
CNormalFraction * mpFraction

Member Data Documentation

CNormalFraction* CNormalFunction::mpFraction
protected
Type CNormalFunction::mType
protected

Definition at line 72 of file CNormalFunction.h.

Referenced by getType(), operator<(), operator=(), operator==(), setType(), and toString().

const char * CNormalFunction::NAMES
static

Definition at line 77 of file CNormalFunction.h.

Referenced by convertToCEvaluationNode(), and toString().


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