本文整理汇总了C++中EvolutionaryAlgorithm类的典型用法代码示例。如果您正苦于以下问题:C++ EvolutionaryAlgorithm类的具体用法?C++ EvolutionaryAlgorithm怎么用?C++ EvolutionaryAlgorithm使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了EvolutionaryAlgorithm类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test_set_reserve_all_training_history
void EvolutionaryAlgorithmTest::test_set_reserve_all_training_history(void)
{
message += "test_set_reserve_all_training_history\n";
EvolutionaryAlgorithm ea;
ea.set_reserve_all_training_history(true);
}
示例2: test_resize_training_history
void TestEvolutionaryAlgorithm::test_resize_training_history(void)
{
message += "test_resize_training_history\n";
EvolutionaryAlgorithm ea;
ea.resize_training_history(1);
ea.resize_training_history(0);
}
示例3: test_to_XML
void TestEvolutionaryAlgorithm::test_to_XML(void)
{
message += "test_to_XML\n";
EvolutionaryAlgorithm ea;
std::string object = ea.to_XML(true);
//std::cout << object << std::endl;
}
示例4: test_set_standard_deviation_evaluation_goal
void TestEvolutionaryAlgorithm::test_set_standard_deviation_evaluation_goal(void)
{
message += "test_set_standard_deviation_evaluation_goal\n";
EvolutionaryAlgorithm ea;
ea.set_standard_deviation_evaluation_goal(1.0);
assert_true(ea.get_standard_deviation_evaluation_goal() == 1.0, LOG);
}
示例5: test_set_recombination_size
void EvolutionaryAlgorithmTest::test_set_recombination_size(void)
{
message += "test_set_recombination_size\n";
EvolutionaryAlgorithm ea;
ea.set_recombination_size(0.0);
assert_true(ea.get_recombination_size() == 0.0, LOG);
}
示例6: assert_true
void EvolutionaryAlgorithmTest::test_get_fitness_assignment_method(void)
{
message += "test_get_fitness_assignment_method\n";
EvolutionaryAlgorithm ea;
ea.set_fitness_assignment_method(EvolutionaryAlgorithm::LinearRanking);
assert_true(ea.get_fitness_assignment_method() == EvolutionaryAlgorithm::LinearRanking, LOG);
}
示例7: test_get_best_evaluation_history
void TestEvolutionaryAlgorithm::test_get_best_evaluation_history(void)
{
message += "test_get_best_evaluation_history\n";
EvolutionaryAlgorithm ea;
Vector<double> best_evaluation_history = ea.get_best_evaluation_history();
assert_true(best_evaluation_history.get_size() == 0, LOG);
}
示例8: test_get_standard_deviation_norm_history
void TestEvolutionaryAlgorithm::test_get_standard_deviation_norm_history(void)
{
message += "test_get_standard_deviation_norm_history\n";
EvolutionaryAlgorithm ea;
Vector<double> standard_deviation_norm_history = ea.get_standard_deviation_norm_history();
assert_true(standard_deviation_norm_history.get_size() == 0, LOG);
}
示例9: test_get_population_history
void TestEvolutionaryAlgorithm::test_get_population_history(void)
{
message += "test_get_population_history\n";
EvolutionaryAlgorithm ea;
Vector< Matrix<double> > population_history = ea.get_population_history();
assert_true(population_history.get_size() == 0, LOG);
}
示例10: test_set_maximum_generations_number
void EvolutionaryAlgorithmTest::test_set_maximum_generations_number(void)
{
message += "test_set_maximum_generations_number\n";
EvolutionaryAlgorithm ea;
ea.set_maximum_generations_number(1);
assert_true(ea.get_maximum_generations_number() == 1, LOG);
}
示例11: test_set_standard_deviation_performance_goal
void EvolutionaryAlgorithmTest::test_set_standard_deviation_performance_goal(void)
{
message += "test_set_standard_deviation_performance_goal\n";
EvolutionaryAlgorithm ea;
ea.set_standard_deviation_performance_goal(1.0);
assert_true(ea.get_standard_deviation_performance_goal() == 1.0, LOG);
}
示例12: test_set_mutation_range
void EvolutionaryAlgorithmTest::test_set_mutation_range(void)
{
message += "test_set_mutation_range\n";
EvolutionaryAlgorithm ea;
ea.set_mutation_range(0.0);
assert_true(ea.get_mutation_range() == 0.0, LOG);
}
示例13: test_get_population_size
void EvolutionaryAlgorithmTest::test_get_population_size(void)
{
message += "test_get_population_size\n";
EvolutionaryAlgorithm ea;
size_t population_size = ea.get_population_size();
assert_true(population_size == 0, LOG);
}
示例14: test_set_selective_pressure
void EvolutionaryAlgorithmTest::test_set_selective_pressure(void)
{
message += "test_set_selective_pressure\n";
EvolutionaryAlgorithm ea;
ea.set_selective_pressure(1.0);
assert_true(ea.get_selective_pressure() == 1.0, LOG);
}
示例15: test_to_XML
void EvolutionaryAlgorithmTest::test_to_XML(void)
{
message += "test_to_XML\n";
EvolutionaryAlgorithm ea;
tinyxml2::XMLDocument* document = ea.to_XML();
assert_true(document != NULL, LOG);
delete document;
}