/[ascend]/trunk/pygtk/integratorreporter.cpp
ViewVC logotype

Diff of /trunk/pygtk/integratorreporter.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1147 by johnpye, Sat Nov 25 10:46:13 2006 UTC revision 1148 by johnpye, Mon Jan 15 23:40:40 2007 UTC
# Line 57  int Line 57  int
57  IntegratorReporterConsole::initOutput(){  IntegratorReporterConsole::initOutput(){
58      long nobs = integrator->getNumObservedVars();      long nobs = integrator->getNumObservedVars();
59      stringstream ss;      stringstream ss;
60        f << "t";
61        ss<< "-------";
62      for(long i=0; i<nobs; ++i){      for(long i=0; i<nobs; ++i){
         if(i){  
             f << "\t";  
             ss << "\t";  
         }  
63          Variable v = integrator->getObservedVariable(i);          Variable v = integrator->getObservedVariable(i);
64          f << v.getName();          f << "\t" << v.getName();
65          ss << "-------";          ss<< "\t" << "-------";
66      }      }
67      f << endl;      f << endl;
68      f << ss.str() << endl;      f << ss.str() << endl;
# Line 80  int IntegratorReporterConsole::updateSta Line 78  int IntegratorReporterConsole::updateSta
78  }  }
79    
80  int IntegratorReporterConsole::recordObservedValues(){  int IntegratorReporterConsole::recordObservedValues(){
81        IntegratorSystem *sys = integrator->getInternalType();
82        f << integrator_get_t(sys) << "\t";
83      vector<double> data(integrator->getNumObservedVars());      vector<double> data(integrator->getNumObservedVars());
84      integrator_get_observations(integrator->getInternalType(),&data[0]);      integrator_get_observations(sys,&data[0]);
85      copy(data.begin(),data.end(),ostream_iterator<double>(f,"\t"));      copy(data.begin(),data.end(),ostream_iterator<double>(f,"\t"));
86      f << endl;      f << endl;
87      return 1;      return 1;

Legend:
Removed from v.1147  
changed lines
  Added in v.1148

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22