COPASI API  4.16.103
Functions
CInterpolation.cpp File Reference
#include "CInterpolation.h"
#include <vector>
#include <set>
#include <new>
#include <iostream>
Include dependency graph for CInterpolation.cpp:

Go to the source code of this file.

Functions

void printInterpolation (const CInterpolation &interp)
 
void printRecord (const CStateRecord &record)
 

Function Documentation

void printInterpolation ( const CInterpolation interp)

Friend Function for Debug

Definition at line 294 of file CInterpolation.cpp.

References CInterpolation::mBeginRecordIndex, CInterpolation::mHaveRecordNum, CInterpolation::mpState, CInterpolation::mShiftBeginIndex, CInterpolation::mStateNum, and printRecord().

295 {
296  std::cout << "State Num: " << interp.mStateNum << std::endl;
297  std::cout << "Record Num: " << interp.mHaveRecordNum << std::endl;
298  std::cout << "Begin Record Index: " << interp.mBeginRecordIndex << std::endl;
299  std::cout << "Shift or not: ";
300 
301  if (interp.mShiftBeginIndex)
302  std::cout << "Yes" << std::endl;
303  else
304  std::cout << "No" << std::endl;
305 
306  int site;
307 
308  for (size_t i = 0; i < interp.mHaveRecordNum; i++)
309  {
310  std::cout << "Record #:" << i << std::endl;
311  site = (interp.mBeginRecordIndex + i) % interp.mStateNum;
312  printRecord(interp.mpState[site]);
313  }
314 
315  std::cout << "Finish, aha" << std::endl;
316  return;
317 }
CStateRecord * mpState
size_t mBeginRecordIndex
void printRecord(const CStateRecord &record)
void printRecord ( const CStateRecord record)

Friend Function for Debug

Definition at line 81 of file CInterpolation.cpp.

References CStateRecord::mpValues, and CStateRecord::mSize.

Referenced by printInterpolation().

82 {
83  for (size_t i = 0; i < record.mSize; i++)
84  {
85  std::cout << record.mpValues[i] << " ";
86  }
87 
88  std::cout << std::endl;
89  return;
90 }
C_FLOAT64 * mpValues