copasi API  0.1
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends
CFunctionAnalyzer::CValue Class Reference

#include <CFunctionAnalyzer.h>

List of all members.

Public Types

enum  Status {
  novalue = 0, negative = 1, zero = 2, positive = 4,
  invalid = 8, known = 16, unknown = 7
}

Public Member Functions

 CValue ()
 CValue (Status status)
 CValue (const double &d)
const double & getValue () const
void setValue (const double &value)
const StatusgetStatus () const
void setStatus (const Status &status)
CValue operator* (const CValue &rhs) const
CValue operator/ (const CValue &rhs) const
CValue operator+ (const CValue &rhs) const
CValue operator- (const CValue &rhs) const
CValue operator^ (const CValue &rhs) const
bool isPositive () const
bool containsPositive () const
bool isZero () const
bool containsZero () const
bool isNegative () const
bool containsNegative () const
bool isInvalid () const
bool containsInvalid () const
bool operator== (const CValue &rhs) const
CValue invert () const

Protected Member Functions

void Or (int s)
void Or (const CValue &v)
void orValue (const double &value)

Static Protected Member Functions

static CValue generalize (const double &d)

Friends

std::ostream & operator<< (std::ostream &os, const CValue &v)

Detailed Description

This is the base class of the arithmetics of the function analyzer. It describes possibilities for values. It basically consists of some flags that tell whether the value can be positive, can be negative, can be zero, or invalid, or if an actual exact numerical value is known. The usual arithmetic operators are defined for this class, the most important functions need to be implemented still. The missing functions are not critical since there is a save fallback: If you do not know how to perform a specific operation on CValues, the result should be (unknown|invalid).


Member Enumeration Documentation

Enumerator:
novalue 
negative 
zero 
positive 
invalid 
known 
unknown 

Constructor & Destructor Documentation

CFunctionAnalyzer::CValue::CValue ( ) [inline]
CFunctionAnalyzer::CValue::CValue ( Status  status) [inline]
CFunctionAnalyzer::CValue::CValue ( const double &  d) [inline]

Member Function Documentation

bool CFunctionAnalyzer::CValue::containsInvalid ( ) const
bool CFunctionAnalyzer::CValue::containsNegative ( ) const
bool CFunctionAnalyzer::CValue::containsPositive ( ) const
bool CFunctionAnalyzer::CValue::containsZero ( ) const
CFunctionAnalyzer::CValue CFunctionAnalyzer::CValue::generalize ( const double &  d) [static, protected]

convert a CValue with status "known" to a more general status.

const Status& CFunctionAnalyzer::CValue::getStatus ( ) const [inline]
const double& CFunctionAnalyzer::CValue::getValue ( ) const [inline]
CFunctionAnalyzer::CValue CFunctionAnalyzer::CValue::invert ( ) const
bool CFunctionAnalyzer::CValue::isInvalid ( ) const
bool CFunctionAnalyzer::CValue::isNegative ( ) const
bool CFunctionAnalyzer::CValue::isPositive ( ) const
bool CFunctionAnalyzer::CValue::isZero ( ) const
CFunctionAnalyzer::CValue CFunctionAnalyzer::CValue::operator* ( const CValue rhs) const
CFunctionAnalyzer::CValue CFunctionAnalyzer::CValue::operator+ ( const CValue rhs) const
CFunctionAnalyzer::CValue CFunctionAnalyzer::CValue::operator- ( const CValue rhs) const
CFunctionAnalyzer::CValue CFunctionAnalyzer::CValue::operator/ ( const CValue rhs) const
bool CFunctionAnalyzer::CValue::operator== ( const CValue rhs) const
CFunctionAnalyzer::CValue CFunctionAnalyzer::CValue::operator^ ( const CValue rhs) const
void CFunctionAnalyzer::CValue::Or ( int  s) [inline, protected]
void CFunctionAnalyzer::CValue::Or ( const CValue v) [protected]
void CFunctionAnalyzer::CValue::orValue ( const double &  value) [inline, protected]

add the value to the set off possible values

void CFunctionAnalyzer::CValue::setStatus ( const Status status) [inline]
void CFunctionAnalyzer::CValue::setValue ( const double &  value) [inline]

set value to be the only possible value


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CValue v 
) [friend]

insert operator


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines