MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Unit tests for StdDevTemplate and VarianceTemplate. More...
#include "Mesquite.hpp"
#include "StdDevTemplate.hpp"
#include "VarianceTemplate.hpp"
#include "MsqError.hpp"
#include "PatchData.hpp"
#include "ObjectiveFunctionTests.hpp"
#include "MsqHessian.hpp"
Go to the source code of this file.
Classes | |
class | StdDevTemplateTest |
Functions | |
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION (StdDevTemplateTest,"StdDevTemplateTest") | |
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION (StdDevTemplateTest,"Unit") | |
static double | std_dev_sqr (const double *array, unsigned len) |
Variables | |
const double | EPSILON = 1e-4 |
Unit tests for StdDevTemplate and VarianceTemplate.
Definition in file StdDevTemplateTest.cpp.
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION | ( | StdDevTemplateTest | , |
"StdDevTemplateTest" | |||
) |
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION | ( | StdDevTemplateTest | , |
"Unit" | |||
) |
static double std_dev_sqr | ( | const double * | array, |
unsigned | len | ||
) | [static] |
Definition at line 403 of file StdDevTemplateTest.cpp.
References moab::sum().
Referenced by StdDevTemplateTest::test_evaluate(), and StdDevTemplateTest::test_evaluate_sqr().
{ double sum = 0, sqr_sum = 0; for( size_t i = 0; i < len; ++i ) { sum += array[i]; sqr_sum += array[i] * array[i]; } return sqr_sum / len - ( sum / len ) * ( sum / len ); }
const double EPSILON = 1e-4 |
Definition at line 43 of file StdDevTemplateTest.cpp.