⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_util.cxx

📁 DTMK软件开发包,此为开源软件,是一款很好的医学图像开发资源.
💻 CXX
字号:
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -