copasi API
0.1
|
#include <CUnit.h>
Classes | |
class | SymbolicExponent |
this class uniquely (in a given context) identifies a symbol | |
Public Member Functions | |
CUnit (unsigned int sbmlLevel, unsigned int sbmlVersion) | |
Default constructor. | |
CUnit (const CUnit &src) | |
Copy constructor. | |
CUnit (const UnitDefinition *ud) | |
Constructor from libsbml units. | |
virtual | ~CUnit () |
bool | multiply (const CUnit &unit) |
void | invert () |
void | applyExponent (double exp) |
apply numeric exponent to the unit. | |
void | applyExponent (const std::string &id, int frame) |
apply symbolic exponent to the unit | |
void | applyInverseExponent (const std::string &id, int frame) |
apply inverse of symbolic exponent to the unit | |
virtual std::string | getDisplayString () const |
bool | isDimensionless () const |
UnitDefinition & | getSBMLUnitDefinition () |
const UnitDefinition & | getSBMLUnitDefinition () const |
int | getSymbolicExpExp () const |
const std::string & | getSymbolicExponent () const |
Static Public Member Functions | |
static bool | isEqual (const CUnit &unit1, const CUnit &unit2) |
The current implementation of the units is just a wrapper for the libsbml UnitDefinition class.
CUnit::CUnit | ( | unsigned int | sbmlLevel, |
unsigned int | sbmlVersion | ||
) |
Default constructor.
CUnit::CUnit | ( | const CUnit & | src | ) |
Copy constructor.
CUnit::CUnit | ( | const UnitDefinition * | ud | ) |
Constructor from libsbml units.
CUnit::~CUnit | ( | ) | [virtual] |
void CUnit::applyExponent | ( | double | exp | ) |
apply numeric exponent to the unit.
The current implementation only supports integer exponents.
void CUnit::applyExponent | ( | const std::string & | id, |
int | frame | ||
) |
apply symbolic exponent to the unit
This method applies a symbol as an exponent to the unit. The result is not really a valid unit itself, but the exponent can cancel out later during the calculations (via applyInverseExponent() ). In the current implementation, a string and an integer (sbml id + frame stack index) are sufficient to uniquely identify a symbol within one expression. In other words: Once we know the frame index the ID is unique.
void CUnit::applyInverseExponent | ( | const std::string & | id, |
int | frame | ||
) |
apply inverse of symbolic exponent to the unit
This method applies a symbol as a reverse exponent to the unit. The result is not really a valid unit itself, but the exponent can cancel out later. See applyExponent(std::string id, int frame)
std::string CUnit::getDisplayString | ( | ) | const [virtual] |
Reimplemented in CUnitInformation.
UnitDefinition& CUnit::getSBMLUnitDefinition | ( | ) | [inline] |
const UnitDefinition& CUnit::getSBMLUnitDefinition | ( | ) | const [inline] |
int CUnit::getSymbolicExpExp | ( | ) | const [inline] |
const std::string& CUnit::getSymbolicExponent | ( | ) | const [inline] |
void CUnit::invert | ( | ) |
bool CUnit::isDimensionless | ( | ) | const |
bool CUnit::multiply | ( | const CUnit & | unit | ) |