當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。