C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
cmplx::complex_t Struct Reference

#include <complex_type.hpp>

Public Types

typedef std::complex< double > value_type
 

Public Member Functions

 complex_t ()
 
 complex_t (const complex_t &d)
 
 complex_t (const double &real, const double &imag)
 
 complex_t (const value_type &v)
 
complex_toperator= (const double &d)
 
template<typename T >
complex_toperator= (const T d)
 
complex_toperator= (const complex_t &r)
 
complex_toperator+= (const complex_t &r)
 
complex_toperator-= (const complex_t &r)
 
complex_toperator*= (const complex_t &r)
 
complex_toperator/= (const complex_t &r)
 
complex_toperator= (const double r)
 
complex_toperator+= (const double r)
 
complex_toperator-= (const double r)
 
complex_toperator*= (const double r)
 
complex_toperator/= (const double r)
 
complex_toperator++ ()
 
complex_toperator-- ()
 
complex_t operator++ (int)
 
complex_t operator-- (int)
 
complex_t operator- () const
 
template<typename T >
 operator T () const
 
 operator bool () const
 
bool operator== (const complex_t &r) const
 
bool operator!= (const complex_t &r) const
 

Public Attributes

std::complex< double > c_
 

Detailed Description

Definition at line 31 of file complex_type.hpp.

Member Typedef Documentation

◆ value_type

typedef std::complex<double> cmplx::complex_t::value_type

Definition at line 33 of file complex_type.hpp.

Constructor & Destructor Documentation

◆ complex_t() [1/4]

cmplx::complex_t::complex_t ( )
inline

Definition at line 35 of file complex_type.hpp.

36 : c_(0.0)
37 {}
std::complex< double > c_

◆ complex_t() [2/4]

cmplx::complex_t::complex_t ( const complex_t d)
inline

Definition at line 39 of file complex_type.hpp.

40 : c_(d.c_)
41 {}

◆ complex_t() [3/4]

cmplx::complex_t::complex_t ( const double &  real,
const double &  imag 
)
inline

Definition at line 43 of file complex_type.hpp.

44 : c_(real,imag)
45 {}

◆ complex_t() [4/4]

cmplx::complex_t::complex_t ( const value_type v)
inline

Definition at line 47 of file complex_type.hpp.

48 : c_(v)
49 {}

Member Function Documentation

◆ operator bool()

cmplx::complex_t::operator bool ( ) const
inline

Definition at line 78 of file complex_type.hpp.

78{ return (c_ != 0.0); }

References c_.

◆ operator T()

template<typename T >
cmplx::complex_t::operator T ( ) const
inline

Definition at line 77 of file complex_type.hpp.

77{ return static_cast<T>(c_.real()); }

References c_.

◆ operator!=()

bool cmplx::complex_t::operator!= ( const complex_t r) const
inline

Definition at line 81 of file complex_type.hpp.

81{ return (c_ != r.c_); }

References c_.

◆ operator*=() [1/2]

complex_t & cmplx::complex_t::operator*= ( const complex_t r)
inline

Definition at line 59 of file complex_type.hpp.

59{ c_ *= r.c_; return *this; }

References c_.

◆ operator*=() [2/2]

complex_t & cmplx::complex_t::operator*= ( const double  r)
inline

Definition at line 65 of file complex_type.hpp.

65{ c_ *= r; return *this; }

References c_.

◆ operator++() [1/2]

complex_t & cmplx::complex_t::operator++ ( )
inline

Definition at line 68 of file complex_type.hpp.

68{ c_ += 1.0; return *this; }

References c_.

◆ operator++() [2/2]

complex_t cmplx::complex_t::operator++ ( int  )
inline

Definition at line 71 of file complex_type.hpp.

71{ complex_t tmp(c_); c_ += 1.0; return tmp; }

References c_.

◆ operator+=() [1/2]

complex_t & cmplx::complex_t::operator+= ( const complex_t r)
inline

Definition at line 57 of file complex_type.hpp.

57{ c_ += r.c_; return *this; }

References c_.

◆ operator+=() [2/2]

complex_t & cmplx::complex_t::operator+= ( const double  r)
inline

Definition at line 63 of file complex_type.hpp.

63{ c_ += r; return *this; }

References c_.

◆ operator-()

complex_t cmplx::complex_t::operator- ( ) const
inline

Definition at line 74 of file complex_type.hpp.

74{ complex_t d; d.c_ = -c_; return d; }

References c_.

◆ operator--() [1/2]

complex_t & cmplx::complex_t::operator-- ( )
inline

Definition at line 69 of file complex_type.hpp.

69{ c_ -= 1.0; return *this; }

References c_.

◆ operator--() [2/2]

complex_t cmplx::complex_t::operator-- ( int  )
inline

Definition at line 72 of file complex_type.hpp.

72{ complex_t tmp(c_); c_ -= 1.0; return tmp; }

References c_.

◆ operator-=() [1/2]

complex_t & cmplx::complex_t::operator-= ( const complex_t r)
inline

Definition at line 58 of file complex_type.hpp.

58{ c_ -= r.c_; return *this; }

References c_.

◆ operator-=() [2/2]

complex_t & cmplx::complex_t::operator-= ( const double  r)
inline

Definition at line 64 of file complex_type.hpp.

64{ c_ -= r; return *this; }

References c_.

◆ operator/=() [1/2]

complex_t & cmplx::complex_t::operator/= ( const complex_t r)
inline

Definition at line 60 of file complex_type.hpp.

60{ c_ /= r.c_; return *this; }

References c_.

◆ operator/=() [2/2]

complex_t & cmplx::complex_t::operator/= ( const double  r)
inline

Definition at line 66 of file complex_type.hpp.

66{ c_ /= r; return *this; }

References c_.

◆ operator=() [1/4]

complex_t & cmplx::complex_t::operator= ( const complex_t r)
inline

Definition at line 56 of file complex_type.hpp.

56{ c_ = r.c_; return *this; }

References c_.

◆ operator=() [2/4]

complex_t & cmplx::complex_t::operator= ( const double &  d)
inline

Definition at line 51 of file complex_type.hpp.

51{ c_ = d; return *this; }

References c_.

◆ operator=() [3/4]

complex_t & cmplx::complex_t::operator= ( const double  r)
inline

Definition at line 62 of file complex_type.hpp.

62{ c_ = r; return *this; }

References c_.

◆ operator=() [4/4]

template<typename T >
complex_t & cmplx::complex_t::operator= ( const T  d)
inline

Definition at line 54 of file complex_type.hpp.

54{ c_ = (double)d; return *this; }

References c_.

◆ operator==()

bool cmplx::complex_t::operator== ( const complex_t r) const
inline

Definition at line 80 of file complex_type.hpp.

80{ return (c_ == r.c_); }

References c_.

Member Data Documentation

◆ c_

std::complex<double> cmplx::complex_t::c_

The documentation for this struct was generated from the following file: