added best position updating + printOn

This commit is contained in:
tlegrand 2007-10-08 15:22:25 +00:00
commit c864f2deb5
4 changed files with 24 additions and 29 deletions

View file

@ -120,6 +120,16 @@ public:
velocities.resize (_size);
}
/**
* Print-on a vector-particle
*/
virtual void printOn(std::ostream& os) const
{
PO<FitT>::printOn(os);
os << ' ';
os << size() << ' ';
std::copy(bestPositions.begin(), bestPositions.end(), std::ostream_iterator<AtomType>(os, " "));
}
/* public attributes */
std::vector < PositionType > bestPositions;