MCPcopy Create free account
hub / github.com/bgrimstad/splinter / _checkNorm

Function _checkNorm

test/testingutilities.cpp:877–889  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

875}
876
877void _checkNorm(DenseMatrix normValues, int row, size_t numPoints, double one_eps, double two_eps, double inf_eps)
878{
879 bool withinThreshold =\
880 normValues(row,0) / numPoints <= one_eps
881 && normValues(row,1) <= two_eps
882 && normValues(row,2) <= inf_eps;
883
884 INFO(std::setw(16) << std::left << "1-norm (\"avg\"):" << std::setw(16) << std::right << normValues(row,0) / numPoints);
885 INFO(std::setw(16) << std::left << "2-norm:" << std::setw(16) << std::right << normValues(row,1));
886 INFO(std::setw(16) << std::left << "inf-norm:" << std::setw(16) << std::right << normValues(row,2));
887
888 CHECK(withinThreshold);
889}
890
891// Must use std::function because a capturing alpha cannot be converted to a function pointer
892void testApproximation(std::vector<TestFunction *> funcs,

Callers 1

checkNormFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected