MOAB: Mesh Oriented datABase  (version 5.4.1)
StdDevTemplateTest Class Reference
+ Inheritance diagram for StdDevTemplateTest:
+ Collaboration diagram for StdDevTemplateTest:

Public Member Functions

void test_eval_calc ()
void test_eval_accum ()
void test_eval_save ()
void test_eval_update ()
void test_eval_temp ()
void test_eval_calc_sqr ()
void test_eval_accum_sqr ()
void test_eval_save_sqr ()
void test_eval_update_sqr ()
void test_eval_temp_sqr ()
void test_grad_calc ()
void test_grad_accum ()
void test_grad_save ()
void test_grad_update ()
void test_grad_temp ()
void test_grad_calc_sqr ()
void test_grad_accum_sqr ()
void test_grad_save_sqr ()
void test_grad_update_sqr ()
void test_grad_temp_sqr ()
void test_diag_calc ()
void test_diag_accum ()
void test_diag_save ()
void test_diag_update ()
void test_diag_temp ()
void test_diag_calc_sqr ()
void test_diag_accum_sqr ()
void test_diag_save_sqr ()
void test_diag_update_sqr ()
void test_diag_temp_sqr ()
void test_evaluate ()
void test_evaluate_sqr ()
void test_numerical_gradient ()
void test_numerical_gradient_sqr ()
void test_diagonal_gradient ()
void test_diagonal_gradient_sqr ()
void test_hessian_diag ()
void test_hessian_diag_sqr ()
void test_hessian_fails ()
void test_hessian_fails_sqr ()
void test_failed_metric_in_eval ()
void test_failed_metric_in_grad ()
void test_failed_metric_in_eval_sqr ()
void test_failed_metric_in_grad_sqr ()
void test_false_metric_in_eval ()
void test_false_metric_in_grad ()
void test_false_metric_in_eval_sqr ()
void test_false_metric_in_grad_sqr ()
void test_clone ()
void test_clone_sqr ()
void test_eval_negate ()
void test_eval_negate_sqr ()
void test_grad_negate ()
void test_grad_negate_sqr ()
void test_diag_negate ()
void test_diag_negate_sqr ()

Private Member Functions

 CPPUNIT_TEST_SUITE (StdDevTemplateTest)
 CPPUNIT_TEST (test_eval_calc)
 CPPUNIT_TEST (test_eval_accum)
 CPPUNIT_TEST (test_eval_save)
 CPPUNIT_TEST (test_eval_update)
 CPPUNIT_TEST (test_eval_temp)
 CPPUNIT_TEST (test_eval_calc_sqr)
 CPPUNIT_TEST (test_eval_accum_sqr)
 CPPUNIT_TEST (test_eval_save_sqr)
 CPPUNIT_TEST (test_eval_update_sqr)
 CPPUNIT_TEST (test_eval_temp_sqr)
 CPPUNIT_TEST (test_grad_calc)
 CPPUNIT_TEST (test_grad_save)
 CPPUNIT_TEST (test_grad_update)
 CPPUNIT_TEST (test_grad_temp)
 CPPUNIT_TEST (test_grad_calc_sqr)
 CPPUNIT_TEST (test_grad_save_sqr)
 CPPUNIT_TEST (test_grad_update_sqr)
 CPPUNIT_TEST (test_grad_temp_sqr)
 CPPUNIT_TEST (test_diag_calc)
 CPPUNIT_TEST (test_diag_save)
 CPPUNIT_TEST (test_diag_update)
 CPPUNIT_TEST (test_diag_temp)
 CPPUNIT_TEST (test_diag_calc_sqr)
 CPPUNIT_TEST (test_diag_save_sqr)
 CPPUNIT_TEST (test_diag_update_sqr)
 CPPUNIT_TEST (test_diag_temp_sqr)
 CPPUNIT_TEST (test_hessian_fails)
 CPPUNIT_TEST (test_hessian_fails_sqr)
 CPPUNIT_TEST (test_failed_metric_in_eval)
 CPPUNIT_TEST (test_failed_metric_in_grad)
 CPPUNIT_TEST (test_failed_metric_in_eval_sqr)
 CPPUNIT_TEST (test_failed_metric_in_grad_sqr)
 CPPUNIT_TEST (test_false_metric_in_eval)
 CPPUNIT_TEST (test_false_metric_in_grad)
 CPPUNIT_TEST (test_false_metric_in_eval_sqr)
 CPPUNIT_TEST (test_false_metric_in_grad_sqr)
 CPPUNIT_TEST (test_evaluate)
 CPPUNIT_TEST (test_evaluate_sqr)
 CPPUNIT_TEST (test_numerical_gradient)
 CPPUNIT_TEST (test_numerical_gradient_sqr)
 CPPUNIT_TEST (test_diagonal_gradient)
 CPPUNIT_TEST (test_diagonal_gradient_sqr)
 CPPUNIT_TEST (test_hessian_diag)
 CPPUNIT_TEST (test_hessian_diag_sqr)
 CPPUNIT_TEST (test_clone)
 CPPUNIT_TEST (test_clone_sqr)
 CPPUNIT_TEST (test_eval_negate)
 CPPUNIT_TEST (test_eval_negate_sqr)
 CPPUNIT_TEST (test_grad_negate)
 CPPUNIT_TEST (test_grad_negate_sqr)
 CPPUNIT_TEST (test_diag_negate)
 CPPUNIT_TEST (test_diag_negate_sqr)
 CPPUNIT_TEST_SUITE_END ()

Detailed Description

Definition at line 45 of file StdDevTemplateTest.cpp.


Member Function Documentation

Definition at line 229 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::ACCUMULATE.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::ACCUMULATE, DIAG, &of );
    }

Definition at line 255 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::ACCUMULATE.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::ACCUMULATE, DIAG, &of );
    }

Definition at line 224 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::CALCULATE.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::CALCULATE, DIAG, &of );
    }

Definition at line 250 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::CALCULATE.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::CALCULATE, DIAG, &of );
    }

Definition at line 388 of file StdDevTemplateTest.cpp.

    {
        StdDevTemplate of( NULL );
        test_negate_flag( DIAG, &of );
    }

Definition at line 393 of file StdDevTemplateTest.cpp.

    {
        VarianceTemplate of( NULL );
        test_negate_flag( DIAG, &of );
    }

Definition at line 234 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::SAVE.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::SAVE, DIAG, &of );
    }

Definition at line 260 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::SAVE.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::SAVE, DIAG, &of );
    }

Definition at line 244 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::TEMPORARY.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::TEMPORARY, DIAG, &of );
    }

Definition at line 270 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::TEMPORARY.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::TEMPORARY, DIAG, &of );
    }

Definition at line 239 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::UPDATE.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::UPDATE, DIAG, &of );
    }

Definition at line 265 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::UPDATE.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::UPDATE, DIAG, &of );
    }

Definition at line 290 of file StdDevTemplateTest.cpp.

    {
        StdDevTemplate of( NULL );
        compare_diagonal_gradient( &of );
    }

Definition at line 295 of file StdDevTemplateTest.cpp.

Definition at line 125 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::ACCUMULATE.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::ACCUMULATE, EVAL, &of );
    }

Definition at line 151 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::ACCUMULATE.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::ACCUMULATE, EVAL, &of );
    }

Definition at line 120 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::CALCULATE.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::CALCULATE, EVAL, &of );
    }

Definition at line 146 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::CALCULATE.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::CALCULATE, EVAL, &of );
    }

Definition at line 368 of file StdDevTemplateTest.cpp.

    {
        StdDevTemplate of( NULL );
        test_negate_flag( EVAL, &of );
    }

Definition at line 373 of file StdDevTemplateTest.cpp.

    {
        VarianceTemplate of( NULL );
        test_negate_flag( EVAL, &of );
    }

Definition at line 130 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::SAVE.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::SAVE, EVAL, &of );
    }

Definition at line 156 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::SAVE.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::SAVE, EVAL, &of );
    }

Definition at line 140 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::TEMPORARY.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::TEMPORARY, EVAL, &of );
    }

Definition at line 166 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::TEMPORARY.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::TEMPORARY, EVAL, &of );
    }

Definition at line 135 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::UPDATE.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::UPDATE, EVAL, &of );
    }

Definition at line 161 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::UPDATE.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::UPDATE, EVAL, &of );
    }

Definition at line 415 of file StdDevTemplateTest.cpp.

References std_dev_sqr(), and test_value().

{
    StdDevTemplate OF( NULL );

    const double list1[] = { 1.0, 0.0, -5.0, 0.2, 6.0, 3 };
    const unsigned len1  = sizeof( list1 ) / sizeof( list1[0] );
    test_value( list1, len1, sqrt( std_dev_sqr( list1, len1 ) ), EVAL, &OF );

    const double list2[] = { 20, -30, 40, -50, 60, -70, 80, -90 };
    const unsigned len2  = sizeof( list2 ) / sizeof( list2[0] );
    test_value( list2, len2, sqrt( std_dev_sqr( list2, len2 ) ), EVAL, &OF );
}

Definition at line 428 of file StdDevTemplateTest.cpp.

References std_dev_sqr(), and test_value().

{
    VarianceTemplate OF( NULL );

    const double list1[] = { 1.0, 0.0, -5.0, 0.2, 6.0, 3 };
    const unsigned len1  = sizeof( list1 ) / sizeof( list1[0] );
    test_value( list1, len1, std_dev_sqr( list1, len1 ), EVAL, &OF );

    const double list2[] = { 20, -30, 40, -50, 60, -70, 80, -90 };
    const unsigned len2  = sizeof( list2 ) / sizeof( list2[0] );
    test_value( list2, len2, std_dev_sqr( list2, len2 ), EVAL, &OF );
}

Definition at line 315 of file StdDevTemplateTest.cpp.

    {
        StdDevTemplate of( NULL );
        test_handles_qm_error( EVAL, &of );
    }

Definition at line 325 of file StdDevTemplateTest.cpp.

    {
        VarianceTemplate of( NULL );
        test_handles_qm_error( EVAL, &of );
    }

Definition at line 320 of file StdDevTemplateTest.cpp.

    {
        StdDevTemplate of( NULL );
        test_handles_qm_error( GRAD, &of );
    }

Definition at line 330 of file StdDevTemplateTest.cpp.

    {
        VarianceTemplate of( NULL );
        test_handles_qm_error( GRAD, &of );
    }

Definition at line 336 of file StdDevTemplateTest.cpp.

    {
        StdDevTemplate of( NULL );
        test_handles_invalid_qm( EVAL, &of );
    }

Definition at line 346 of file StdDevTemplateTest.cpp.

    {
        VarianceTemplate of( NULL );
        test_handles_invalid_qm( EVAL, &of );
    }

Definition at line 341 of file StdDevTemplateTest.cpp.

    {
        StdDevTemplate of( NULL );
        test_handles_invalid_qm( GRAD, &of );
    }

Definition at line 351 of file StdDevTemplateTest.cpp.

    {
        VarianceTemplate of( NULL );
        test_handles_invalid_qm( GRAD, &of );
    }

Definition at line 177 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::ACCUMULATE.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::ACCUMULATE, GRAD, &of );
    }

Definition at line 203 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::ACCUMULATE.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::ACCUMULATE, GRAD, &of );
    }

Definition at line 172 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::CALCULATE.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::CALCULATE, GRAD, &of );
    }

Definition at line 198 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::CALCULATE.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::CALCULATE, GRAD, &of );
    }

Definition at line 378 of file StdDevTemplateTest.cpp.

    {
        StdDevTemplate of( NULL );
        test_negate_flag( GRAD, &of );
    }

Definition at line 383 of file StdDevTemplateTest.cpp.

    {
        VarianceTemplate of( NULL );
        test_negate_flag( GRAD, &of );
    }

Definition at line 182 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::SAVE.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::SAVE, GRAD, &of );
    }

Definition at line 208 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::SAVE.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::SAVE, GRAD, &of );
    }

Definition at line 192 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::TEMPORARY.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::TEMPORARY, GRAD, &of );
    }

Definition at line 218 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::TEMPORARY.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::TEMPORARY, GRAD, &of );
    }

Definition at line 187 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::UPDATE.

    {
        StdDevTemplate of( NULL );
        test_eval_type( ObjectiveFunction::UPDATE, GRAD, &of );
    }

Definition at line 213 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::UPDATE.

    {
        VarianceTemplate of( NULL );
        test_eval_type( ObjectiveFunction::UPDATE, GRAD, &of );
    }

Definition at line 301 of file StdDevTemplateTest.cpp.

Definition at line 441 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::CALCULATE, CPPUNIT_ASSERT, MBMesquite::ObjectiveFunction::evaluate_with_Hessian(), MBMesquite::grad(), MBMesquite::MsqHessian::initialize(), MSQ_CHKERR, and value().

{
    MsqError err;
    double value;
    bool rval;
    vector< Vector3D > grad;
    MsqHessian Hess;
    Hess.initialize( patch(), err );
    CPPUNIT_ASSERT( !MSQ_CHKERR( err ) );

    OFTestQM metric( &value, 1 );
    StdDevTemplate func( &metric );
    rval = func.evaluate_with_Hessian( ObjectiveFunction::CALCULATE, patch(), value, grad, Hess, err );
    CPPUNIT_ASSERT( err );
}

Definition at line 457 of file StdDevTemplateTest.cpp.

References MBMesquite::ObjectiveFunction::CALCULATE, CPPUNIT_ASSERT, MBMesquite::ObjectiveFunction::evaluate_with_Hessian(), MBMesquite::grad(), MBMesquite::MsqHessian::initialize(), MSQ_CHKERR, and value().

{
    MsqError err;
    double value;
    bool rval;
    vector< Vector3D > grad;
    MsqHessian Hess;
    Hess.initialize( patch(), err );
    CPPUNIT_ASSERT( !MSQ_CHKERR( err ) );

    OFTestQM metric( &value, 1 );
    VarianceTemplate func( &metric );
    rval = func.evaluate_with_Hessian( ObjectiveFunction::CALCULATE, patch(), value, grad, Hess, err );
    CPPUNIT_ASSERT( err );
}

Definition at line 279 of file StdDevTemplateTest.cpp.

    {
        StdDevTemplate of( NULL );
        compare_numerical_gradient( &of );
    }

Definition at line 284 of file StdDevTemplateTest.cpp.

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines