Namespaces | Macros
vnl_complex.h File Reference

Complex additions to vnl_math. More...

#include <cmath>
#include <complex>
#include <iosfwd>
#include <vnl/vnl_math.h>
#include "vnl/vnl_export.h"

Go to the source code of this file.

Namespaces

 vnl_math
 real numerical constants.
 

Macros

#define type_macro(T)
 

Detailed Description

Complex additions to vnl_math.

We don't want everyone to pay for complex when they don't need it, as its ratio of expense to frequency of use is high. So we define those functions from vnl_math which use complex here instead. So this file adds to the vnl_math namespace.

  Modifications
   LSB (Manchester) 26/03/2001 Tidied documentation
   Peter Vanroose   24/10/2012 Now adds to the vnl_math namespace

Definition in file vnl_complex.h.

Macro Definition Documentation

◆ type_macro

#define type_macro (   T)
Value:
inline bool isnan(std::complex<T >const& z) { return isnan(std::real(z)) || isnan(std::imag(z)); } \
inline bool isfinite(std::complex<T >const& z) { return isfinite(std::real(z)) && isfinite(std::imag(z)); } \
inline T abs(std::complex<T > const& z) { return std::abs(z); } \
inline std::complex<T > sqr(std::complex<T > const& z) { return z*z; } \
inline T squared_magnitude(std::complex<T > const& z) { return std::norm(z); }
vnl_finite_int< N > squared_magnitude(vnl_finite_int< N > const &x)
Definition: vnl_finite.h:397
bool isfinite(vnl_finite_int< N > const &)
Definition: vnl_finite.h:412
bool isnan(vnl_finite_int< N > const &)
Definition: vnl_finite.h:407
vnl_bignum abs(vnl_bignum const &x)
Definition: vnl_bignum.h:432
vnl_finite_int< N > sqr(vnl_finite_int< N > const &x)
Definition: vnl_finite.h:402

Definition at line 31 of file vnl_complex.h.