test_util.cxx
来自「DTMK软件开发包,此为开源软件,是一款很好的医学图像开发资源.」· CXX 代码 · 共 21 行
CXX
21 行
// This is core/vnl/algo/tests/test_util.cxx
#include <vcl_complex.h>
#include <vnl/vnl_random.h>
#define macro(T) \
void test_util_fill_random(T *b, T *e, vnl_random &rng) \
{ \
for (T *p=b; p<e; ++p) \
*p = (T)rng.drand64(-1.0, +1.0); \
} \
void test_util_fill_random(vcl_complex<T> *b, vcl_complex<T> *e, vnl_random &rng) \
{ \
for (vcl_complex<T> *p=b; p<e; ++p) \
*p = vcl_complex<T>((T)rng.drand64(-1.0, +1.0), (T)rng.drand64(-1.0, +1.0)); \
}
macro(float);
macro(double);
macro(long double);
#undef macro
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?