COPASI API
4.40.278
|
#include <CMatrix.h>
Public Types | |
typedef CType | elementType |
Public Member Functions | |
bool | applyPivot (const CVector< size_t > &pivot) |
virtual CType * | array () |
virtual const CType * | array () const |
CMatrix (const CMatrix< CType > &src) | |
CMatrix (size_t rows=0, size_t cols=0) | |
virtual size_t | numCols () const |
virtual size_t | numRows () const |
virtual elementType & | operator() (const size_t &row, const size_t &col) |
virtual const elementType & | operator() (const size_t &row, const size_t &col) const |
virtual CMatrix< CType > & | operator= (const CMatrix< CType > &rhs) |
virtual CMatrix< CType > & | operator= (const CType &value) |
virtual CType * | operator[] (size_t row) |
virtual const CType * | operator[] (size_t row) const |
virtual void | resize (size_t rows, size_t cols, const bool ©=false) |
virtual size_t | size () const |
virtual | ~CMatrix () |
Protected Attributes | |
size_t | mCols |
CType * | mpBuffer |
size_t | mRows |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CMatrix< CType > &A) |
Template class CMatrix < class CType > This template class is a simple matrix class allowing standard C-style and fortran style access to the elements. It also supplies an ostream operator.
typedef CType CMatrix< CType >::elementType |
Default constructor
size_t | rows (default = 0) |
size_t | cols (default = 0) |
References CMatrix< CType >::resize().
Copy constructor
const | CMatrix <CType> & src |
References CMatrix< CType >::mCols, CMatrix< CType >::mpBuffer, CMatrix< CType >::mRows, and CMatrix< CType >::resize().
Destructor.
References CMatrix< CType >::mpBuffer.
Reorder the rows according to the provided pivots
const | CVector<size_t> & pivot |
References CMatrix< CType >::mCols, CMatrix< CType >::mpBuffer, CMatrix< CType >::mRows, pdeletev, and CVectorCore< CType >::size().
Referenced by CExperiment::read().
|
inlinevirtual |
Retrieve the array of the matrix elements. This is suitable for interfacing with clapack routines.
References CMatrix< CType >::mpBuffer.
Referenced by CLinkMatrix::applyColumnPivot(), CLinkMatrix::build(), CBitPatternMethod::buildFluxModes(), CBitPatternTreeMethod::buildFluxModes(), CBitPatternMethod::buildKernelMatrix(), CBitPatternTreeMethod::buildKernelMatrix(), CSSAMethod::buildKineticMatrix(), CModel::buildMoieties(), CStochasticRungeKuttaRI5::buildStage1(), CStochasticRungeKuttaRI5::buildStage2(), CModel::buildStoi(), CSSAMethod::buildStoichiometry(), CFitProblem::calcCov(), CFitProblem::calcEigen(), CEigen::calcEigenValues(), CFitProblem::calculate(), CTimeSensMethod::calculate_dAssignments_dPar(), CTimeSensMethod::calculate_dAssignments_dState(), CTimeSensMethod::calculate_dInitialState_dPar(), CTimeSensMethod::calculate_dRate_dPar(), CLNAMethod::calculateCovarianceMatrixFull(), CLNAMethod::calculateCovarianceMatrixReduced(), CFitProblem::calculateCrossValidation(), CMathContainer::calculateJacobian(), CBitPatternMethod::CalculateKernel(), CBitPatternTreeMethod::CalculateKernel(), CMathContainer::calculateRootJacobian(), CStochasticRungeKuttaRI5::calculateStateVariables(), CExperiment::calculateStatistics(), CFitProblem::calculateStatistics(), CMCAMethod::calculateUnscaledConcentrationCC(), CMCAMethod::calculateUnscaledElasticities(), CMCAMethod::calculateUnscaledFluxCC(), CMCAMethod::checkSummationTheorems(), CFitProblem::createParameterSets(), CStepMatrix::CStepMatrix(), CSSAMethod::decomposeJacobian(), CSSAMethod::diag(), dgemm::eval(), CLyapWolfMethod::evalF(), CTimeSensLsodaMethod::evalF(), CStochasticRungeKuttaRI5::generateRandomNumbers(), CExperiment::getErrorMeanSD(), CExperiment::getErrorSum(), COptMethodSteepestDescent::gradient(), CModel::handleUnusedMetabolites(), COptMethodLevenbergMarquardt::hessian(), CExperiment::initializeScalingMatrix(), CEFMMethod::isValidProblem(), CLinkMatrix::leftMultiply(), CSparseMatrix::operator const CMatrix< C_FLOAT64 >(), CSparseMatrix::operator=(), COptMethodLevenbergMarquardt::optimise(), CBitPatternMethod::performRankTest(), CSteadyStateTask::process(), CFitProblem::restore(), CLinkMatrix::rightMultiply(), CMCAMethod::scaleMCA(), COptMethodTruncatedNewton::sFun(), CCSPMethod::sminverse(), CLeastSquareSolution::solve(), and CFitProblem::updateContainer().
|
inlinevirtual |
Retrieve the array of the matrix elements. This is suitable for interfacing with clapack routines.
References CMatrix< CType >::mpBuffer.
|
inlinevirtual |
The number of columns of the matrix
References CMatrix< CType >::mCols.
Referenced by CLinkMatrix::applyColumnPivot(), CLinkMatrix::applyRowPivot(), CLinkMatrix::build(), CBitPatternMethod::buildFluxModeMatrix(), CBitPatternMethod::buildFluxModes(), CBitPatternTreeMethod::buildFluxModes(), CBitPatternMethod::buildKernelMatrix(), CBitPatternTreeMethod::buildKernelMatrix(), CModel::buildRedStoi(), CEigen::calcEigenValues(), CFitProblem::calcFIM(), CFitProblem::calcPartialFIM(), CFitProblem::calculate(), CLNAMethod::calculateCovarianceMatrixReduced(), CFitProblem::calculateCrossValidation(), CBitPatternMethod::CalculateKernel(), CBitPatternTreeMethod::CalculateKernel(), CMathContainer::calculateRootDerivatives(), CExperiment::calculateStatistics(), CMCAMethod::calculateUnscaledConcentrationCC(), CMCAMethod::checkSummationTheorems(), CBitPatternMethod::combine(), CExperiment::compile(), CModel::createEventsForTimeseries(), CMCAMethod::createLinkMatrix(), CStepMatrix::CStepMatrix(), CSSAMethod::decomposeJacobian(), CNewtonMethod::doNewtonStep(), dgemm::eval(), CExperiment::getErrorMeanSD(), CExperiment::getErrorSum(), CExperiment::getTotalValueCount(), CModel::handleUnusedMetabolites(), COptMethodLevenbergMarquardt::hessian(), CBitPatternMethod::initialize(), CBitPatternTreeMethod::initialize(), CExperiment::initializeScalingMatrix(), CEFMMethod::isValidProblem(), CLinkMatrix::leftMultiply(), LUfactor(), CLinkMatrixView::numCols(), CSparseMatrix::operator=(), CBitPatternMethod::performRankTest(), CExperiment::printResult(), CMCAMethod::resizeAllMatrices(), CLinkMatrix::rightMultiply(), CMCAMethod::scaleMCA(), CLeastSquareSolution::solve(), CExperiment::storeExtendedTimeSeriesData(), CExperiment::sumOfSquares(), CExperiment::sumOfSquaresStore(), CExperiment::updateFittedPointValues(), and CExperiment::updateFittedPointValuesFromExtendedTimeSeries().
|
inlinevirtual |
The number of rows of the matrix.
References CMatrix< CType >::mRows.
Referenced by CLinkMatrix::applyColumnPivot(), CLinkMatrix::applyRowPivot(), CLinkMatrix::build(), CBitPatternMethod::buildFluxModeMatrix(), CBitPatternMethod::buildKernelMatrix(), CBitPatternTreeMethod::buildKernelMatrix(), CFitProblem::calcCov(), CFitProblem::calcEigen(), CEigen::calcEigenValues(), CFitProblem::calcFIM(), CFitProblem::calcPartialFIM(), CLNAMethod::calculateCovarianceMatrixReduced(), CBitPatternMethod::CalculateKernel(), CBitPatternTreeMethod::CalculateKernel(), CExperiment::calculateStatistics(), CMCAMethod::calculateUnscaledConcentrationCC(), CMCAMethod::calculateUnscaledFluxCC(), CHybridMethod::checkModel(), CHybridMethodODE45::checkModel(), CMCAMethod::checkSummationTheorems(), CExperiment::compile(), CSSAMethod::decomposeJacobian(), dgemm::eval(), CExperiment::getErrorMeanSD(), CExperiment::getErrorSum(), CModel::handleUnusedMetabolites(), CBitPatternMethod::initialize(), CExperiment::initializeScalingMatrix(), CLinkMatrix::leftMultiply(), LUfactor(), CLinkMatrixView::numRows(), CSparseMatrix::operator=(), CMCAMethod::resizeAllMatrices(), CLinkMatrix::rightMultiply(), CLeastSquareSolution::solve(), and CModel::suitableForStochasticSimulation().
|
inlinevirtual |
Retrieve a matrix element using c-style indexing.
const | size_t & row |
const | size_t & col |
References CMatrix< CType >::mCols, CMatrix< CType >::mpBuffer, and CMatrix< CType >::mRows.
|
inlinevirtual |
Retrieve a matrix element using c-style indexing.
const | size_t & row |
const | size_t & col |
References CMatrix< CType >::mCols, CMatrix< CType >::mpBuffer, and CMatrix< CType >::mRows.
|
inlinevirtual |
Assignment operator
const | CMatrix <CType> & rhs |
References CMatrix< CType >::mCols, CMatrix< CType >::mpBuffer, CMatrix< CType >::mRows, and CMatrix< CType >::resize().
|
inlinevirtual |
Assignment operator
const | CType & value |
References CMatrix< CType >::mCols, CMatrix< CType >::mpBuffer, and CMatrix< CType >::mRows.
|
inlinevirtual |
Retrieve a row of the matrix using c-style indexing
size_t | row |
References CMatrix< CType >::mCols, and CMatrix< CType >::mpBuffer.
|
inlinevirtual |
Retrieve a row of the matrix using c-style indexing
size_t | row |
References CMatrix< CType >::mCols, and CMatrix< CType >::mpBuffer.
|
inlinevirtual |
Resize the matrix. The previous content is lost
size_t | rows |
size_t | cols |
References C_FLOAT64, CCopasiMessage::EXCEPTION, max, CMatrix< CType >::mCols, MCopasiBase, min, CMatrix< CType >::mpBuffer, and CMatrix< CType >::mRows.
Referenced by CBitPatternMethod::buildKernelMatrix(), CBitPatternTreeMethod::buildKernelMatrix(), CSSAMethod::buildKineticMatrix(), CModel::buildRedStoi(), CModel::buildStoi(), CSSAMethod::buildStoichiometry(), CFitProblem::calcEigen(), CEigen::calcEigenValues(), CFitProblem::calcFIM(), CFitProblem::calcPartialFIM(), CTimeSensMethod::calculate_dAssignments_dPar(), CTimeSensMethod::calculate_dAssignments_dState(), CTimeSensMethod::calculate_dInitialState_dPar(), CTimeSensMethod::calculate_dRate_dPar(), CLNAMethod::calculateCovarianceMatrixFull(), CLNAMethod::calculateCovarianceMatrixReduced(), CMathContainer::calculateElasticityDependencies(), CMathContainer::calculateJacobian(), CMathContainer::calculateJacobianDependencies(), CBitPatternMethod::CalculateKernel(), CBitPatternTreeMethod::CalculateKernel(), CMathContainer::calculateRootJacobian(), CFitProblem::calculateStatistics(), CMCAMethod::calculateUnscaledConcentrationCC(), CTimeSeries::clear(), CMatrix< CType >::CMatrix(), CTimeSeries::compile(), CMCAMethod::createLinkMatrix(), CCSPMethod::CSPImportanceIndex(), CCSPMethod::CSPParticipationIndex(), CCSPMethod::CSPradicalPointer(), CCSPMethod::cspstep(), CSSAMethod::decomposeJacobian(), CSSAMethod::diag(), dgemm::eval(), CTimeSeries::increaseAllocation(), COptMethodLevenbergMarquardt::initialize(), COptMethodNelderMead::initialize(), COptMethodNL2SOL::initialize(), COptMethodPS::initialize(), CFitProblem::initialize(), CCSPMethod::initializeOutput(), CExperiment::initializeScalingMatrix(), CLinkMatrix::leftMultiply(), CTSSAMethod::mat_anal_fast_space(), CTSSAMethod::mat_anal_mod(), CTSSAMethod::mat_anal_mod_space(), CILDMMethod::newton(), CILDMModifiedMethod::newton_new(), CSparseMatrix::operator const CMatrix< C_FLOAT64 >(), CMatrix< CType >::operator=(), CExperiment::read(), CLNAMethod::resizeAllMatrices(), CMCAMethod::resizeAllMatrices(), CLinkMatrix::rightMultiply(), CCSPMethod::setAnnotationM(), CILDMMethod::setAnnotationM(), CILDMModifiedMethod::setAnnotationM(), CLyapWolfMethod::start(), CTimeSensLsodaMethod::start(), CStochasticRungeKuttaRI5::start(), CCSPMethod::start(), CILDMMethod::start(), CILDMModifiedMethod::start(), CCSPMethod::step(), CILDMMethod::step(), CILDMModifiedMethod::step(), CTSSAMethod::sylvester(), CSteadyStateTask::updateMatrices(), and CCSPMethod::yCorrection().
|
inlinevirtual |
The number of elements stored in the matrix.
References CMatrix< CType >::mCols, and CMatrix< CType >::mRows.
Referenced by CBitPatternMethod::buildKernelMatrix(), CBitPatternTreeMethod::buildKernelMatrix(), CEigen::calcEigenValues(), CLNAMethod::calculateCovarianceMatrixFull(), CLNAMethod::calculateCovarianceMatrixReduced(), CMathContainer::calculateJacobian(), CBitPatternMethod::CalculateKernel(), CBitPatternTreeMethod::CalculateKernel(), CMathContainer::calculateRootJacobian(), CMCAMethod::calculateUnscaledElasticities(), CMCAMethod::checkSummationTheorems(), CStepMatrix::CStepMatrix(), CSSAMethod::diag(), CExperiment::initializeScalingMatrix(), CEFMMethod::isValidProblem(), CLinkMatrix::leftMultiply(), CSteadyStateTask::process(), CLinkMatrix::rightMultiply(), and CLeastSquareSolution::solve().
|
friend |
Output stream operator
ostream | & os |
const | CMatrix< CType > & A |
|
protected |
Number of columns in the matrix
Referenced by CMatrix< CType >::applyPivot(), CMatrix< CType >::CMatrix(), CMatrix< CType >::numCols(), CMatrix< CType >::operator()(), CMatrix< CType >::operator=(), CMatrix< CType >::operator[](), CMatrix< CType >::resize(), and CMatrix< CType >::size().
|
protected |
The array storing the matrix elements
Referenced by CMatrix< CType >::applyPivot(), CMatrix< CType >::array(), CMatrix< CType >::CMatrix(), CMatrix< CType >::operator()(), CMatrix< CType >::operator=(), CMatrix< CType >::operator[](), CMatrix< CType >::resize(), and CMatrix< CType >::~CMatrix().
|
protected |
Number of rows in the matrix.
Referenced by CMatrix< CType >::applyPivot(), CMatrix< CType >::CMatrix(), CMatrix< CType >::numRows(), CMatrix< CType >::operator()(), CMatrix< CType >::operator=(), CMatrix< CType >::resize(), and CMatrix< CType >::size().