SingleRandomMoveSchedule::SingleRandomMoveSchedule(RbVector<Move> *s) : MoveSchedule( s ) { sumOfWeights = 0.0; for (RbIterator<Move> it = moves->begin(); it != moves->end(); ++it) { sumOfWeights+= it->getUpdateWeight(); weights.push_back( it->getUpdateWeight() ); } }
/** * Reset the sampler. * We reset the counters of all moves. */ void HillClimber::reset( void ) { double movesPerIteration = 0.0; for (RbIterator<Move> it = moves.begin(); it != moves.end(); ++it) { it->resetCounters(); movesPerIteration += it->getUpdateWeight(); } }