/[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 1386 by johnpye, Sun Mar 4 13:26:32 2007 UTC revision 1387 by jpye, Sat Apr 7 14:43:31 2007 UTC
# Line 58  int Line 58  int
58  IntegratorReporterConsole::initOutput(){  IntegratorReporterConsole::initOutput(){
59      long nobs = integrator->getNumObservedVars();      long nobs = integrator->getNumObservedVars();
60      stringstream ss;      stringstream ss;
61      f << "t";      f << setw(11) << right << "t";
62      ss<< "-------";      ss << setw(11)<< right << "-------";
63      for(long i=0; i<nobs; ++i){      for(long i=0; i<nobs; ++i){
64          Variable v = integrator->getObservedVariable(i);          Variable v = integrator->getObservedVariable(i);
65          f << "\t" << setw(12) << v.getName();          f << "  " << setw(11) << right << v.getName();
66          ss<< "\t" << setw(12) << "-------";          ss<< "  " << setw(11) << right << "-----------";
67      }      }
68      f << endl;      f << endl;
69      f << ss.str() << endl;      f << ss.str() << endl;
# Line 80  int IntegratorReporterConsole::updateSta Line 80  int IntegratorReporterConsole::updateSta
80    
81  int IntegratorReporterConsole::recordObservedValues(){  int IntegratorReporterConsole::recordObservedValues(){
82      IntegratorSystem *sys = integrator->getInternalType();      IntegratorSystem *sys = integrator->getInternalType();
83      f << setw(12) << integrator_get_t(sys);      f << setw(11) << integrator_get_t(sys);
84      vector<double> data(integrator->getNumObservedVars());      vector<double> data(integrator->getNumObservedVars());
85      integrator_get_observations(sys,&data[0]);      integrator_get_observations(sys,&data[0]);
86      //copy(data.begin(),data.end(),ostream_iterator<double>(f,"\t"));      //copy(data.begin(),data.end(),ostream_iterator<double>(f,"\t"));
87      for(vector<double>::iterator i=data.begin();i<data.end();++i){      for(vector<double>::iterator i=data.begin();i<data.end();++i){
88          f << '\t' << setw(12) << *i;          f << "  " << setw(11) << *i;
89      }      }
90      f << endl;      f << endl;
91      return 1;      return 1;

Legend:
Removed from v.1386  
changed lines
  Added in v.1387

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