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

📄 vcl_complex.h

📁 InsightToolkit-1.4.0(有大量的优化算法程序)
💻 H
字号:
#ifndef vcl_complex_h_
#define vcl_complex_h_

#include "vcl_compiler.h"

// File: vcl_complex.h
// 
// The task of this horrible file is to rationalize the complex number
// support in the various compilers.  Basically it promises to give you:
//
// A working vcl_complex<T> template.
//
// Stream >> and << operators.
//
// Instances of the types vcl_complex<float> and vcl_complex<double>
//
// A macro VCL_COMPLEX_INSTANTIATE(T) which allows you to instantiate
// complex over other number types.
//
// If you just want to forward declare the vcl complex types, use 
// vcl_complex_fwd.h instead.
#include "vcl_complex_fwd.h"

// ---------- all emulation
#if !VCL_USE_NATIVE_COMPLEX 
# include "emulation/vcl_complex.h"

// ---------- Visual Studio 6
#elif VCL_VC60
# include "win32-vc60/vcl_complex.h"

// ---------- SunPro compiler
#elif defined(VCL_SUNPRO_CC)
# include "sunpro/vcl_complex.h"

// ---------- SGI 7*0
#elif defined(VCL_SGI_CC_7)
#include  "sgi/vcl_complex.h"

// ---------- MW
#elif defined(VCL_METRO_WERKS)
#include  "mwerks/vcl_complex.h"

// ---------- BORLAND
#elif defined(VCL_BORLAND)
#include  "borland/vcl_complex.h"

// ---------- ISO
#else
# include "iso/vcl_complex.h"
#endif

#if 0
// this breaks the sunpro build. it should be moved so that
// it is only seen by compilers that need it. - fsm.
inline vcl_complex<double> operator*(float c, vcl_complex<double> const &z) { return z * (double)c; }
inline vcl_complex<double> operator*(vcl_complex<double> const &z, float c) { return z * (double)c; }
inline vcl_complex<float > operator*(double c, vcl_complex<float> const &z) { return z * (float)c; }
inline vcl_complex<float > operator*(vcl_complex<float> const &z, double c) { return z * (float)c; }
inline vcl_complex<double> operator/(vcl_complex<double> const &z, float c) { return z / (double)c; }
inline vcl_complex<float > operator/(vcl_complex<float> const &z, double c) { return z / (float)c; }
#endif

//--------------------------------------------------------------------------------

// bogus instantiation macro.
#define VCL_COMPLEX_INSTANTIATE(T) extern "you must include vcl_complex.txx instead"

#if VCL_USE_IMPLICIT_TEMPLATES
# include "vcl_complex.txx"
#endif

#endif // vcl_complex_h_

⌨️ 快捷键说明

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