本文整理汇总了C++中MockObjectiveFunctional类的典型用法代码示例。如果您正苦于以下问题:C++ MockObjectiveFunctional类的具体用法?C++ MockObjectiveFunctional怎么用?C++ MockObjectiveFunctional使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MockObjectiveFunctional类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test_set_default
void TestObjectiveFunctional::test_set_default(void)
{
message += "test_set_default\n";
MockObjectiveFunctional mof;
mof.set_default();
}
示例2: test_save
void TestObjectiveFunctional::test_save(void)
{
message += "test_save\n";
MockObjectiveFunctional mof;
mof.save("../Data/MockObjectiveFunctional.dat");
}
示例3: test_get_calculate_Hessian_count
void TestObjectiveFunctional::test_get_calculate_Hessian_count(void)
{
message += "test_get_calculate_Hessian_count\n";
MockObjectiveFunctional mof;
assert_true(mof.get_calculate_Hessian_count() == 0, LOG);
}
示例4: test_to_XML
void TestObjectiveFunctional::test_to_XML(void)
{
message += "test_to_XML\n";
MockObjectiveFunctional mof;
std::string object = mof.to_XML(true);
}
示例5: test_set_calculate_gradient_count
void TestObjectiveFunctional::test_set_calculate_gradient_count(void)
{
message += "test_set_calculate_gradient_count\n";
MockObjectiveFunctional mof;
mof.set_calculate_gradient_count(1);
assert_true(mof.get_calculate_gradient_count() == 1, LOG);
}
示例6: test_set_numerical_epsilon
void TestObjectiveFunctional::test_set_numerical_epsilon(void)
{
message += "test_set_numerical_epsilon\n";
MockObjectiveFunctional mof;
mof.set_numerical_epsilon(1.0e-3);
assert_true(mof.get_numerical_epsilon() == 1.0e-3, LOG);
}
示例7: test_set_regularization_weight
void TestObjectiveFunctional::test_set_regularization_weight(void)
{
message += "test_set_regularization_weight\n";
MockObjectiveFunctional mof;
mof.set_regularization_weight(1.0);
assert_true(mof.get_regularization_weight() == 1.0, LOG);
}
示例8: test_get_objective_weight
void TestObjectiveFunctional::test_get_objective_weight(void)
{
message += "test_get_objective_weight\n";
MockObjectiveFunctional mof;
mof.set_objective_weight(0.0);
assert_true(mof.get_objective_weight() == 0.0, LOG);
}
示例9: test_calculate_actual_epsilon
void TestObjectiveFunctional::test_calculate_actual_epsilon(void)
{
message += "test_calculate_actual_epsilon\n";
MockObjectiveFunctional mof;
double actual_epsilon = mof.calculate_actual_epsilon(1.0);
assert_true(actual_epsilon == mof.get_numerical_epsilon(), LOG);
}
示例10: test_calculate_validation_error
void TestObjectiveFunctional::test_calculate_validation_error(void)
{
message += "test_calculate_validation_error\n";
MockObjectiveFunctional mof;
double validation_error = mof.calculate_validation_error();
assert_true(validation_error == 0.0, LOG);
}
示例11: test_get_regularization_method
void TestObjectiveFunctional::test_get_regularization_method(void)
{
message += "test_get_regularization_method\n";
MockObjectiveFunctional mof;
mof.set_regularization_method(ObjectiveFunctional::None);
assert_true(mof.get_regularization_method() == ObjectiveFunctional::None, LOG);
mof.set_regularization_method(ObjectiveFunctional::NeuralParametersNorm);
assert_true(mof.get_regularization_method() == ObjectiveFunctional::NeuralParametersNorm, LOG);
}
示例12: test_set_multilayer_perceptron_pointer
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);
}
示例13: test_get_numerical_differentiation_method
void TestObjectiveFunctional::test_get_numerical_differentiation_method(void)
{
message += "test_get_numerical_differentiation_method\n";
MockObjectiveFunctional mof;
mof.set_numerical_differentiation_method(ObjectiveFunctional::ForwardDifferences);
assert_true(mof.get_numerical_differentiation_method() == ObjectiveFunctional::ForwardDifferences, LOG);
mof.set_numerical_differentiation_method(ObjectiveFunctional::CentralDifferences);
assert_true(mof.get_numerical_differentiation_method() == ObjectiveFunctional::CentralDifferences, LOG);
}
示例14: test_get_numerical_epsilon_method
void TestObjectiveFunctional::test_get_numerical_epsilon_method(void)
{
message += "test_get_numerical_epsilon_method\n";
MockObjectiveFunctional mof;
mof.set_numerical_epsilon_method(ObjectiveFunctional::Absolute);
assert_true(mof.get_numerical_epsilon_method() == ObjectiveFunctional::Absolute, LOG);
mof.set_numerical_epsilon_method(ObjectiveFunctional::Relative);
assert_true(mof.get_numerical_epsilon_method() == ObjectiveFunctional::Relative, LOG);
}
示例15: test_get_display
void TestObjectiveFunctional::test_get_display(void)
{
message += "test_get_display\n";
MockObjectiveFunctional mof;
mof.set_display(true);
assert_true(mof.get_display() == true, LOG);
mof.set_display(false);
assert_true(mof.get_display() == false, LOG);
}