test_integrant.cxx

来自「DTMK软件开发包,此为开源软件,是一款很好的医学图像开发资源.」· CXX 代码 · 共 19 行

CXX
19
字号
// not used? #include <vcl_iostream.h>
#include <vnl/vnl_integrant_fnct.h>
#include <testlib/testlib_test.h>

class my_test_integrant : public vnl_integrant_fnct
{
 public:
  double f_(double x) { return x/(1+x*x); }
};

void test_integrant()
{
  my_test_integrant f;

  TEST_NEAR("test integrant f = x/(1+x^2) when x=1, f is ", f.f_(1), 0.5, 1e-13);
}

TESTMAIN(test_integrant);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?