COPASI API  4.16.103
Classes | Public Member Functions | Public Attributes | List of all members
CFunctionAnalyzer::Result Class Reference

#include <CFunctionAnalyzer.h>

Collaboration diagram for CFunctionAnalyzer::Result:
Collaboration graph
[legend]

Classes

struct  FunctionInformation
 

Public Member Functions

void clear ()
 
 Result ()
 
bool writeResult (std::ostream &os, bool rt, bool verbose) const
 

Public Attributes

FunctionInformation mBPart
 
FunctionInformation mFPart
 
bool mIrreversibleKineticsWithProducts
 
FunctionInformation mOriginalFunction
 
const CFunctionmpFunction
 
bool mReversibleNonSplitable
 

Detailed Description

This class contains the result of the analysis of one function.

Definition at line 141 of file CFunctionAnalyzer.h.

Constructor & Destructor Documentation

CFunctionAnalyzer::Result::Result ( )

Definition at line 403 of file CFunctionAnalyzer.cpp.

Referenced by clear().

404  : mpFunction(NULL),
407 {};
const CFunction * mpFunction

Member Function Documentation

void CFunctionAnalyzer::Result::clear ( )
inline

Definition at line 166 of file CFunctionAnalyzer.h.

References Result().

Referenced by CFunctionAnalyzer::checkKineticFunction().

bool CFunctionAnalyzer::Result::writeResult ( std::ostream &  os,
bool  rt,
bool  verbose 
) const

writes a text report about the function to the stream. The return value indicates if a problem was reported.

Definition at line 409 of file CFunctionAnalyzer.cpp.

References TriTrue, TriUnspecified, and CFunctionAnalyzer::write().

Referenced by CModelAnalyzer::ReactionResult::writeResult().

410 {
411  bool ret = false;
412 
413  if (!mpFunction) return false;
414 
415  //function name
416  if (rt) os << "<h3>";
417 
418  os << mpFunction->getObjectName();
419 
420  if (rt) os << "</h3>";
421 
422  os << "\n";
423 
425  {
426  os << write(1, rt, "The kinetic function is marked as irreversible but at least one of its variables is labeled as product.\n", "");
427  ret = true;
428  }
429 
430  //interpret the CValues
431  bool isReversible = (mpFunction->isReversible() == TriTrue);
432 
433  std::ostringstream tmpss;
434 
435  //only interprete the results if the kinetic law has specified reversibility.
436  bool eee = true;
438  eee = mOriginalFunction.writeAnalysis(tmpss, rt, isReversible);
439 
440  if (eee) ret = true;
441 
442  if (eee || verbose)
443  {
444  os << tmpss.str();
446  }
447 
448  //deal with splitted reversible functions
450  {
451  os << write(1, rt, "Copasi is not able to split the reversible kinetic function into two irreversible functions.\n", "");
452  ret = true;
453  }
454  else if (isReversible)
455  {
456  std::ostringstream tmpss1;
457  bool eee1 = mFPart.writeAnalysis(tmpss1, rt, false);
458 
459  std::ostringstream tmpss2;
460  bool eee2 = mBPart.writeAnalysis(tmpss2, rt, false);
461 
462  if (eee1 || eee2) ret = true;
463 
464  if (eee1 || eee2 || verbose)
465  {
466  os << "The function was split into forward and backwards parts. Forward part:\n";
467 
468  if (rt) os << "<br>";
469 
470  os << tmpss1.str();
471  mFPart.writeTable(os, rt);
472  os << " Backwards part:\n";
473 
474  if (rt) os << "<br>";
475 
476  os << tmpss2.str();
477  mBPart.writeTable(os, rt);
478  }
479  }
480 
481  return ret;
482 }
const std::string & getObjectName() const
FunctionInformation mBPart
const TriLogic & isReversible() const
Definition: CFunction.cpp:145
static std::string write(int level, bool rt, const std::string &text, const std::string &longText)
FunctionInformation mOriginalFunction
const CFunction * mpFunction
void writeTable(std::ostream &os, bool rt) const
FunctionInformation mFPart
bool writeAnalysis(std::ostream &os, bool rt, bool reversible) const

Member Data Documentation

FunctionInformation CFunctionAnalyzer::Result::mBPart

low level information about the backwards part of the function

Definition at line 188 of file CFunctionAnalyzer.h.

Referenced by CFunctionAnalyzer::checkKineticFunction().

FunctionInformation CFunctionAnalyzer::Result::mFPart

low level information about the forward part of the function

Definition at line 185 of file CFunctionAnalyzer.h.

Referenced by CFunctionAnalyzer::checkKineticFunction().

bool CFunctionAnalyzer::Result::mIrreversibleKineticsWithProducts

Definition at line 177 of file CFunctionAnalyzer.h.

Referenced by CFunctionAnalyzer::checkKineticFunction().

FunctionInformation CFunctionAnalyzer::Result::mOriginalFunction

low level information about the original function

Definition at line 180 of file CFunctionAnalyzer.h.

Referenced by CFunctionAnalyzer::checkKineticFunction().

const CFunction* CFunctionAnalyzer::Result::mpFunction

Definition at line 176 of file CFunctionAnalyzer.h.

Referenced by CFunctionAnalyzer::checkKineticFunction().

bool CFunctionAnalyzer::Result::mReversibleNonSplitable

Definition at line 182 of file CFunctionAnalyzer.h.

Referenced by CFunctionAnalyzer::checkKineticFunction().


The documentation for this class was generated from the following files: