Пример #1
0
void TestObjectiveFunctional::test_set_multilayer_perceptron_pointer(void)
{
   message += "test_set_multilayer_perceptron_pointer\n";

   MockObjectiveFunctional mof;

   MultilayerPerceptron mlp;

   mof.set_multilayer_perceptron_pointer(&mlp);

   assert_true(mof.get_multilayer_perceptron_pointer() != NULL, LOG);
}
Пример #2
0
void TestEvolutionaryAlgorithm::test_load(void)
{
   message += "test_load\n";

   EvolutionaryAlgorithm ea;
   ea.save("../Data/EvolutionaryAlgorithm.dat");
   ea.load("../Data/EvolutionaryAlgorithm.dat");

   MockObjectiveFunctional mof;
   ea.set_objective_functional_pointer(&mof);

   ea.save("../Data/EvolutionaryAlgorithm.dat");
   ea.load("../Data/EvolutionaryAlgorithm.dat");

   MultilayerPerceptron mlp(1);
   mof.set_multilayer_perceptron_pointer(&mlp);

   ea.save("../Data/EvolutionaryAlgorithm.dat");
   ea.load("../Data/EvolutionaryAlgorithm.dat");
}