copasi API
0.1
|
#include <CExperiment.h>
Public Types | |
enum | Type { ignore = 0, independent, dependent, time } |
enum | WeightMethod { MEAN = 0, MEAN_SQUARE, SD } |
Public Member Functions | |
CExperiment (const CCopasiContainer *pParent, const std::string &name="Experiment") | |
CExperiment (const CExperiment &src, const CCopasiContainer *pParent=NULL) | |
CExperiment (const CCopasiParameterGroup &group, const CCopasiContainer *pParent=NULL) | |
virtual | ~CExperiment () |
CExperiment & | operator= (const CExperiment &rhs) |
virtual bool | elevateChildren () |
bool | compile (const std::vector< CCopasiContainer * > listOfContainer=CCopasiContainer::EmptyList) |
bool | read (std::istream &in, unsigned C_INT32 ¤tLine) |
bool | calculateWeights () |
const std::map< CCopasiObject *, unsigned C_INT32 > & | getDependentObjects () const |
C_FLOAT64 | sumOfSquares (const unsigned C_INT32 &index, C_FLOAT64 *&residuals) const |
C_FLOAT64 | sumOfSquaresStore (const unsigned C_INT32 &index, C_FLOAT64 *&dependentValues) |
bool | calculateStatistics () |
bool | readColumnNames () |
unsigned C_INT32 | guessColumnNumber () const |
const std::vector< std::string > & | getColumnNames () const |
bool | updateModelWithIndependentData (const unsigned C_INT32 &index) |
bool | restoreModelIndependentData () |
bool | setExperimentType (const CCopasiTask::Type &type) |
const CCopasiTask::Type & | getExperimentType () const |
const CVector< C_FLOAT64 > & | getTimeData () const |
const CMatrix< C_FLOAT64 > & | getIndependentData () const |
const CMatrix< C_FLOAT64 > & | getDependentData () const |
const std::string & | getFileName () const |
bool | setFileName (const std::string &fileName) |
CExperimentObjectMap & | getObjectMap () |
const CCopasiVector < CFittingPoint > & | getFittingPoints () const |
void | updateFittedPoints () |
void | updateFittedPointValues (const unsigned C_INT32 &index) |
const unsigned C_INT32 & | getNumColumns () const |
bool | setNumColumns (const unsigned C_INT32 &cols) |
const unsigned C_INT32 & | getFirstRow () const |
bool | setFirstRow (const unsigned C_INT32 &firstRow) |
const unsigned C_INT32 & | getLastRow () const |
bool | setLastRow (const unsigned C_INT32 &lastRow) |
const unsigned C_INT32 & | getHeaderRow () const |
bool | setHeaderRow (const unsigned C_INT32 &headerRow) |
unsigned C_INT32 | getNumDataRows () const |
const std::string & | getSeparator () const |
bool | setSeparator (const std::string &seperator) |
const WeightMethod & | getWeightMethod () const |
bool | setWeightMethod (const WeightMethod &weightMethod) |
const bool & | isRowOriented () const |
bool | setIsRowOriented (const bool &isRowOriented) |
virtual void | printResult (std::ostream *ostream) const |
const C_FLOAT64 & | getObjectiveValue () const |
const C_FLOAT64 & | getRMS () const |
const C_FLOAT64 & | getErrorMean () const |
const C_FLOAT64 & | getErrorMeanSD () const |
C_FLOAT64 | getObjectiveValue (CCopasiObject *const &pObject) const |
C_FLOAT64 | getDefaultWeight (const CCopasiObject *const &pObject) const |
C_FLOAT64 | getRMS (CCopasiObject *const &pObject) const |
C_FLOAT64 | getErrorMean (CCopasiObject *const &pObject) const |
C_FLOAT64 | getErrorMeanSD (CCopasiObject *const &pObject, const C_FLOAT64 &errorMean) const |
unsigned C_INT32 | getCount (CCopasiObject *const &pObject) const |
Static Public Member Functions | |
static bool | compare (const CExperiment *lhs, const CExperiment *rhs) |
Static Public Attributes | |
static const std::string | TypeName [] |
static const char * | XMLType [] |
static const std::string | WeightMethodName [] |
static const char * | WeightMethodType [] |
Friends | |
bool | operator== (const CExperiment &lhs, const CExperiment &rhs) |
enum CExperiment::Type |
Enumeration of the types of columns known to COPASI.
Reimplemented from CCopasiParameter.
CExperiment::CExperiment | ( | const CCopasiContainer * | pParent, |
const std::string & | name = "Experiment" |
||
) |
Default constructor
const | CCopasiContainer * pParent |
const | std::string & name (default: Experiment) |
CExperiment::CExperiment | ( | const CExperiment & | src, |
const CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor
const | CExperiment & src |
const | CCopasiContainer * pParent (default: src data model) |
CExperiment::CExperiment | ( | const CCopasiParameterGroup & | group, |
const CCopasiContainer * | pParent = NULL |
||
) |
Specific constructor used for reading COPASI files
const | CCopasiParameterGroup & group |
const | CCopasiContainer * pParent (default: group data model) |
CExperiment::~CExperiment | ( | ) | [virtual] |
Destructor
bool CExperiment::calculateStatistics | ( | ) |
Calculate statistics by comparing the stored calculated values with the measurements.
bool CExperiment::calculateWeights | ( | ) |
Calculate/set the weights used in the sum of squares.
bool CExperiment::compare | ( | const CExperiment * | lhs, |
const CExperiment * | rhs | ||
) | [static] |
Comparison used to evaluate the order of the experiment based on the filename and starting line number.
const | CExperiment * lhs; |
const | CExperiment * rhs; |
bool CExperiment::compile | ( | const std::vector< CCopasiContainer * > | listOfContainer = CCopasiContainer::EmptyList | ) |
Compile the experiment. This function must be called before any evaluations can be performed.
const | std::vector< CCopasiContainer * > listOfContainer |
bool CExperiment::elevateChildren | ( | ) | [virtual] |
This methods must be called to elevate subgroups to derived objects. The default implementation does nothing.
Reimplemented from CCopasiParameterGroup.
const std::vector< std::string > & CExperiment::getColumnNames | ( | ) | const |
Retrieve the column names
unsigned C_INT32 CExperiment::getCount | ( | CCopasiObject *const & | pObject | ) | const |
Retrieve the data point caount for the object.
CCopasiObject | *const& pObject |
C_FLOAT64 CExperiment::getDefaultWeight | ( | const CCopasiObject *const & | pObject | ) | const |
Retrieve the default weight for the object.
CCopasiObject | *const& pObject |
const CMatrix< C_FLOAT64 > & CExperiment::getDependentData | ( | ) | const |
Retrieve the dependent data of the experiment.
const std::map< CCopasiObject *, unsigned C_INT32 > & CExperiment::getDependentObjects | ( | ) | const |
Retrieve the list of dependent data objects
const C_FLOAT64 & CExperiment::getErrorMean | ( | ) | const |
Retrieve the mean of the error
const | C_FLOAT64 & errorMean |
C_FLOAT64 CExperiment::getErrorMean | ( | CCopasiObject *const & | pObject | ) | const |
Retrieve the error mean for the object.
CCopasiObject | *const& pObject |
const C_FLOAT64 & CExperiment::getErrorMeanSD | ( | ) | const |
Retrieve the std. deviation of the error
const | C_FLOAT64 & errorMeanSD |
C_FLOAT64 CExperiment::getErrorMeanSD | ( | CCopasiObject *const & | pObject, |
const C_FLOAT64 & | errorMean | ||
) | const |
Retrieve the error mean std. deviations for the object.
CCopasiObject | *const& pObject |
C_FLOAT64 | errorMean |
const CCopasiTask::Type & CExperiment::getExperimentType | ( | ) | const |
Retrieve the experiment type
const std::string & CExperiment::getFileName | ( | ) | const |
Retrieve the file name
const unsigned C_INT32 & CExperiment::getFirstRow | ( | ) | const |
Retrieve the first row
const CCopasiVector< CFittingPoint > & CExperiment::getFittingPoints | ( | ) | const |
Retrieve the list of fitting points
const unsigned C_INT32 & CExperiment::getHeaderRow | ( | ) | const |
Retrieve the header row
const CMatrix< C_FLOAT64 > & CExperiment::getIndependentData | ( | ) | const |
Retrieve the independent data of the experiment.
const unsigned C_INT32 & CExperiment::getLastRow | ( | ) | const |
Retrieve the last row
const unsigned C_INT32 & CExperiment::getNumColumns | ( | ) | const |
Retrieve the number of columns
unsigned C_INT32 CExperiment::getNumDataRows | ( | ) | const |
Retrieve the number of data rows
const C_FLOAT64 & CExperiment::getObjectiveValue | ( | ) | const |
Retrieve the value of the objective function
const | C_FLOAT64 & errorMean |
C_FLOAT64 CExperiment::getObjectiveValue | ( | CCopasiObject *const & | pObject | ) | const |
Retrieve the objective value for the object.
CCopasiObject | *const& pObject |
CExperimentObjectMap & CExperiment::getObjectMap | ( | ) |
Retrieve the object map
const C_FLOAT64 & CExperiment::getRMS | ( | ) | const |
Retrieve the RMS
const | C_FLOAT64 & RMS |
C_FLOAT64 CExperiment::getRMS | ( | CCopasiObject *const & | pObject | ) | const |
const std::string & CExperiment::getSeparator | ( | ) | const |
Retrieve the separator
const CVector< C_FLOAT64 > & CExperiment::getTimeData | ( | ) | const |
Retrieve the time data of the experiment.
const CExperiment::WeightMethod & CExperiment::getWeightMethod | ( | ) | const |
Retrieve the method used for calculating the default weights.
unsigned C_INT32 CExperiment::guessColumnNumber | ( | ) | const |
Try to guess the number of columns
const bool & CExperiment::isRowOriented | ( | ) | const |
Check whter the data is row oriented.
CExperiment & CExperiment::operator= | ( | const CExperiment & | rhs | ) |
void CExperiment::printResult | ( | std::ostream * | ostream | ) | const [virtual] |
This is the output method for the statistics for the experiment. This method is called from CFitProblem::printResult.
std::ostream | * ostream |
bool CExperiment::read | ( | std::istream & | in, |
unsigned C_INT32 & | currentLine | ||
) |
Reads the experiment data form a the given stream
std::istream | & in |
unsigned | C_INT32 & currentLine |
bool CExperiment::readColumnNames | ( | ) |
Reads the header row for the experiment data
bool CExperiment::restoreModelIndependentData | ( | ) |
Restore the model with the independent data from before the experiment
bool CExperiment::setExperimentType | ( | const CCopasiTask::Type & | type | ) |
bool CExperiment::setFileName | ( | const std::string & | fileName | ) |
Set the file name
const | std::string & fileName |
bool CExperiment::setFirstRow | ( | const unsigned C_INT32 & | firstRow | ) |
Set the first row containing data
const | unsigned C_INT32 & firstRow |
bool CExperiment::setHeaderRow | ( | const unsigned C_INT32 & | headerRow | ) |
Set the header row containing data
const | unsigned C_INT32 & headerRow |
bool CExperiment::setIsRowOriented | ( | const bool & | isRowOriented | ) |
Set whether the data is row oriented. This only impacts reading the data from a stream
const | bool & isRowOriented |
bool CExperiment::setLastRow | ( | const unsigned C_INT32 & | lastRow | ) |
Set the last row containing data
const | unsigned C_INT32 & lastRow |
bool CExperiment::setNumColumns | ( | const unsigned C_INT32 & | cols | ) |
Set the number of columns in a stream
const | unsigned C_INT32 & cols |
bool CExperiment::setSeparator | ( | const std::string & | seperator | ) |
Set the seperator used when reading a stream
const | std::string & separator |
bool CExperiment::setWeightMethod | ( | const WeightMethod & | weightMethod | ) |
Set the weight calculation method and resets manual adjusted weights
const | WeightMethod & weightMethod |
C_FLOAT64 CExperiment::sumOfSquares | ( | const unsigned C_INT32 & | index, |
C_FLOAT64 *& | residuals | ||
) | const |
Calculate the sum of squares for the indexed row of the experiment. If residuals is not NULL residuals will contain the differences between the calculated and the experiment values.
const | unsigned C_INT32 & index |
C_FLOAT64 | *& residuals (may be NULL) |
C_FLOAT64 CExperiment::sumOfSquaresStore | ( | const unsigned C_INT32 & | index, |
C_FLOAT64 *& | dependentValues | ||
) |
Calculate the sum of squares for the indexed row of the experiment. On return dependentValues contains the calculated values. If residuals is not NULL residuals will contain the differences between the calculated and the experiment values.
const | unsigned C_INT32 & index |
C_FLOAT64 | *& dependentValues (must not be NULL) |
void CExperiment::updateFittedPoints | ( | ) |
This method needs to be called whenever the Object Map is changed
void CExperiment::updateFittedPointValues | ( | const unsigned C_INT32 & | index | ) |
This method is used for output to fill the fitted points with the values of the index data record. If index exceedds the number of data records all values are set to NaN.
bool CExperiment::updateModelWithIndependentData | ( | const unsigned C_INT32 & | index | ) |
Update the model with the independent data of the experiment
const | unsigned C_INT32 & index |
bool operator== | ( | const CExperiment & | lhs, |
const CExperiment & | rhs | ||
) | [friend] |
const std::string CExperiment::TypeName [static] |
{ "ignored", "independent", "dependent", "Time", "" }
String literals for the GUI to display type names of columns known to COPASI.
Reimplemented from CCopasiParameter.
const std::string CExperiment::WeightMethodName [static] |
{ "Mean", "Mean Square", "Standard Deviation", "" }
String literals for the GUI to display weight method known to COPASI.
const char * CExperiment::WeightMethodType [static] |
{ "Mean", "MeanSquare", "StandardDeviation", NULL }
XML type names of weight methods known to COPASI.
const char * CExperiment::XMLType [static] |
{ "ignored", "independent", "dependent", "time", NULL }
XML type names of tasks known to COPASI.
Reimplemented from CCopasiParameter.