copasi API  0.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
CSensMethod Class Reference

#include <CSensMethod.h>

Inheritance diagram for CSensMethod:
CCopasiMethod CCopasiParameterGroup CCopasiParameter CCopasiContainer CCopasiObject

List of all members.

Public Member Functions

 CSensMethod (const CSensMethod &src, const CCopasiContainer *pParent=NULL)
 ~CSensMethod ()
bool process (CProcessReport *handler)
bool initialize (CSensProblem *problem)
virtual bool isValidProblem (const CCopasiProblem *pProblem)
C_INT32 getNumberOfSubtaskCalculations ()

Static Public Member Functions

static CSensMethodcreateSensMethod (CCopasiMethod::SubType subType=CCopasiMethod::sensMethod)

Protected Member Functions

 CSensMethod (CCopasiMethod::SubType subType, const CCopasiContainer *pParent=NULL)
bool calculate_one_level (unsigned C_INT32 level, CCopasiArray &result)
bool do_target_calculation (CCopasiArray &result, bool first)
C_FLOAT64 do_variation (CCopasiObject *variable)
void setValue (CCopasiObject *variable, C_FLOAT64 value)
void calculate_difference (unsigned C_INT32 level, const C_FLOAT64 &delta, CCopasiArray &result, CCopasiArray::index_type &resultindex)
void do_scaling ()
void scaling_targetfunction (const C_FLOAT64 &factor, CCopasiArray::index_type &resultindex)
void scaling_variables (C_INT32 level, const C_FLOAT64 &factor, CCopasiArray::index_type &resultindex)
void do_collapsing ()
C_FLOAT64 do_collapsing_innerloop (CCopasiArray::index_type &fullindex)

Protected Attributes

CSensProblemmpProblem
std::vector< CSensMethodLocalDatamLocalData
std::vector< CCopasiObject * > mTargetfunctionPointers
CCopasiTaskmpSubTask
std::vector< Refresh * > mInitialRefreshes
C_FLOAT64 * mpDeltaFactor
C_FLOAT64 * mpMinDelta
CProcessReportmpProgressBar
unsigned C_INT32 mProgressHandler
C_INT32 mProgress

Constructor & Destructor Documentation

CSensMethod::CSensMethod ( CCopasiMethod::SubType  subType,
const CCopasiContainer pParent = NULL 
) [explicit, protected]

Specific constructor.

Parameters:
CCopasiMethod::SubTypesubType
constCCopasiContainer * pParent (default: NULL)

Default constructor.

CSensMethod::CSensMethod ( const CSensMethod src,
const CCopasiContainer pParent = NULL 
)

Copy constructor.

Parameters:
const CTSSMethod &src
constCCopasiContainer * pParent (default: NULL)

Copy constructor.

Parameters:
const CSensMethod &src
CSensMethod::~CSensMethod ( )

Destructor.


Member Function Documentation

void CSensMethod::calculate_difference ( unsigned C_INT32  level,
const C_FLOAT64 &  delta,
CCopasiArray result,
CCopasiArray::index_type resultindex 
) [protected]
bool CSensMethod::calculate_one_level ( unsigned C_INT32  level,
CCopasiArray result 
) [protected]
CSensMethod * CSensMethod::createSensMethod ( CCopasiMethod::SubType  subType = CCopasiMethod::sensMethod) [static]

Create a trajectory method. Note: the returned object has to be released after use with delete

CSensMethod class.

void CSensMethod::do_collapsing ( ) [protected]

collapse the first dimension of the scaled result (by calculating the 2-norm over the target functions)

C_FLOAT64 CSensMethod::do_collapsing_innerloop ( CCopasiArray::index_type fullindex) [protected]
void CSensMethod::do_scaling ( ) [protected]

calculate the scaled sensitivities. Calls scaling_variables(). It is assumed that the scaled result array is already of the correct size (this is done in initialize()).

bool CSensMethod::do_target_calculation ( CCopasiArray result,
bool  first 
) [protected]
C_FLOAT64 CSensMethod::do_variation ( CCopasiObject variable) [protected]
C_INT32 CSensMethod::getNumberOfSubtaskCalculations ( )

estimate how many calls to the subtask are necessary. Works only after initialize() was called.

bool CSensMethod::initialize ( CSensProblem problem)

initializes the subtask, creates the internal data structures of the method, resizes the result arrays and creates the array annotations

bool CSensMethod::isValidProblem ( const CCopasiProblem pProblem) [virtual]

Check if the method is suitable for this problem

Returns:
bool suitability of the method

Reimplemented from CCopasiMethod.

bool CSensMethod::process ( CProcessReport handler)
void CSensMethod::scaling_targetfunction ( const C_FLOAT64 &  factor,
CCopasiArray::index_type resultindex 
) [protected]

This contains the loop over the target functions for scaling the sensitivities

void CSensMethod::scaling_variables ( C_INT32  level,
const C_FLOAT64 &  factor,
CCopasiArray::index_type resultindex 
) [protected]

This contains the loop over the variables for scaling the sensitivities. Works recursively and calls scaling_targetfunction() in the end.

void CSensMethod::setValue ( CCopasiObject variable,
C_FLOAT64  value 
) [protected]

wraps the CCopasiObject::setObjectValue() method so we can add special treatment of concentrations


Member Data Documentation

std::vector< Refresh * > CSensMethod::mInitialRefreshes [protected]
C_FLOAT64* CSensMethod::mpDeltaFactor [protected]
C_FLOAT64* CSensMethod::mpMinDelta [protected]

A pointer to the sensitivities problem.

C_INT32 CSensMethod::mProgress [protected]
unsigned C_INT32 CSensMethod::mProgressHandler [protected]

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