当前位置: 首页>>代码示例>>C++>>正文


C++ EvolutionaryAlgorithm类代码示例

本文整理汇总了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);
}
开发者ID:MatthewDStevens,项目名称:NLPResources,代码行数:7,代码来源:evolutionary_algorithm_test.cpp

示例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);
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例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;
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例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);
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例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);
}
开发者ID:MatthewDStevens,项目名称:NLPResources,代码行数:10,代码来源:evolutionary_algorithm_test.cpp

示例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);
}
开发者ID:MatthewDStevens,项目名称:NLPResources,代码行数:10,代码来源:evolutionary_algorithm_test.cpp

示例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);
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例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);
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例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);
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例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);
}
开发者ID:MatthewDStevens,项目名称:NLPResources,代码行数:10,代码来源:evolutionary_algorithm_test.cpp

示例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);
}
开发者ID:MatthewDStevens,项目名称:NLPResources,代码行数:10,代码来源:evolutionary_algorithm_test.cpp

示例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);
}
开发者ID:MatthewDStevens,项目名称:NLPResources,代码行数:10,代码来源:evolutionary_algorithm_test.cpp

示例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);
}
开发者ID:MatthewDStevens,项目名称:NLPResources,代码行数:10,代码来源:evolutionary_algorithm_test.cpp

示例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);
}
开发者ID:MatthewDStevens,项目名称:NLPResources,代码行数:10,代码来源:evolutionary_algorithm_test.cpp

示例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;
}
开发者ID:MatthewDStevens,项目名称:NLPResources,代码行数:11,代码来源:evolutionary_algorithm_test.cpp


注:本文中的EvolutionaryAlgorithm类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。