COPASI API  4.16.103
Functions
CFluxScore.cpp File Reference
#include <limits.h>
#include "copasi.h"
#include "CFluxScore.h"
Include dependency graph for CFluxScore.cpp:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const CFluxScore &A)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CFluxScore A 
)

Definition at line 100 of file CFluxScore.cpp.

References CVectorCore< CType >::array(), CFluxScore::mScore, and CVectorCore< CType >::size().

101 {
102  const unsigned char * pScore = A.mScore.array();
103  const unsigned char * pScoreEnd = pScore + A.mScore.size();
104  unsigned char k, kmax = CHAR_BIT * sizeof(unsigned char);
105 
106  for (k = kmax; pScore != pScoreEnd; ++pScore)
107  {
108  k = kmax;
109 
110  while (k > 0)
111  {
112  k--;
113  os << ((*pScore & (0x01 << k)) >> k);
114  }
115  }
116 
117  os << std::endl;
118 
119  return os;
120 }
CVector< unsigned char > mScore
Definition: CFluxScore.h:36
size_t size() const
Definition: CVector.h:100
CType * array()
Definition: CVector.h:139