コード例 #1
0
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() );
    }
}
コード例 #2
0
ファイル: HillClimber.cpp プロジェクト: hscarter/revbayes
/**
 * 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();
        
    }
    
}