예제 #1
0
파일: GABaseGA.C 프로젝트: dbremner/galib
// Here are a few termination functions that you can use.  Terminators return
// gaTrue if the algorithm should finish, gaFalse otherwise.
GABoolean
GAGeneticAlgorithm::TerminateUponGeneration(GAGeneticAlgorithm & ga){
  return(ga.generation() < ga.nGenerations() ? gaFalse : gaTrue);
}
예제 #2
0
파일: twitter.cpp 프로젝트: mkb218/nynex
void TwitterAnnounce::action(const GAGeneticAlgorithm & ga) {
    std::string generation = stringFrom(ga.generation());
    // todo get from config
    announcer_->announceGeneration("Generation " + generation + " created! #megapolis", "","http://nynex.hydrogenproject.com/rate.php");
}