Template Numerical Library: TNL::Arithmetics::Complex< Value > Struct Template Reference

Template Numerical Library version\ main:0b2c40fb1

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
TNL::Arithmetics::Complex< Value > Struct Template Reference

Implementation of complex types. More...

`#include <TNL/Arithmetics/Complex.h>`

## Public Types
using | value_type = Value
using | ValueType = Value

## Public Member Functions
__cuda_callable__ constexpr | Complex (const Complex< Value > &c)
template<typename Value_>
__cuda_callable__ constexpr | Complex (const Complex< Value_ > &c)
template<typename Value_>
constexpr | Complex (const std::complex< Value_ > &c)
__cuda_callable__ constexpr | Complex (const Value &re)
__cuda_callable__ constexpr | Complex (const Value &re, const Value &im)
__cuda_callable__ Value & | imag ()
__cuda_callable__ const Value & | imag () const
__cuda_callable__ const Value & | imag () const volatile
__cuda_callable__ Value & | imag () volatile
__cuda_callable__ bool | operator!= (const Complex< Value > &c) const
template<typename Value_>
__cuda_callable__ bool | operator!= (const Complex< Value_ > &c) const
bool | operator!= (const std::complex< Value > &c) const
template<typename Value_>
bool | operator!= (const std::complex< Value_ > &c) const
__cuda_callable__ bool | operator!= (const Value &v) const
template<typename Value_>
__cuda_callable__ std::enable_if_t< IsScalarType< Value_ >::value &&! is_complex_v< Value_ >, bool > | operator!= (const Value_ &v) const
__cuda_callable__ Complex & | operator*= (const Complex< Value > &c)
template<typename Value_>
__cuda_callable__ Complex & | operator*= (const Complex< Value_ > &c)
Complex & | operator*= (const std::complex< Value > &c)
template<typename Value_>
Complex & | operator*= (const std::complex< Value_ > &c)
__cuda_callable__ Complex & | operator*= (const Value &v)
template<typename Value_>
__cuda_callable__ std::enable_if_t< IsScalarType< Value_ >::value &&! is_complex_v< Value_ >, Complex & > | operator*= (const Value_ &v)
__cuda_callable__ Complex | operator+ () const
__cuda_callable__ Complex & | operator+= (const Complex< Value > &c)
template<typename Value_>
__cuda_callable__ Complex & | operator+= (const Complex< Value_ > &c)
Complex & | operator+= (const std::complex< Value > &c)
template<typename Value_>
Complex & | operator+= (const std::complex< Value_ > &c)
__cuda_callable__ Complex & | operator+= (const Value &v)
template<typename Value_>
__cuda_callable__ std::enable_if_t< IsScalarType< Value_ >::value &&! is_complex_v< Value_ >, Complex & > | operator+= (const Value_ &v)
__cuda_callable__ Complex | operator- () const
__cuda_callable__ Complex & | operator-= (const Complex< Value > &c)
template<typename Value_>
__cuda_callable__ Complex & | operator-= (const Complex< Value_ > &c)
Complex & | operator-= (const std::complex< Value > &c)
template<typename Value_>
Complex & | operator-= (const std::complex< Value_ > &c)
__cuda_callable__ Complex & | operator-= (const Value &v)
template<typename Value_>
__cuda_callable__ std::enable_if_t< IsScalarType< Value_ >::value &&! is_complex_v< Value_ >, Complex & > | operator-= (const Value_ &v)
__cuda_callable__ Complex & | operator/= (const Complex< Value > &c)
template<typename Value_>
__cuda_callable__ Complex & | operator/= (const Complex< Value_ > &c)
Complex & | operator/= (const std::complex< Value > &c)
template<typename Value_>
Complex & | operator/= (const std::complex< Value_ > &c)
__cuda_callable__ Complex & | operator/= (const Value &v)
template<typename Value_>
__cuda_callable__ std::enable_if_t< IsScalarType< Value_ >::value &&! is_complex_v< Value_ >, Complex & > | operator/= (const Value_ &v)
__cuda_callable__ constexpr Complex & | operator= (const Complex< Value > &c)
template<typename Value_>
__cuda_callable__ constexpr Complex & | operator= (const Complex< Value_ > &c)
constexpr Complex & | operator= (const std::complex< Value > &c)
template<typename Value_>
constexpr Complex & | operator= (const std::complex< Value_ > &c)
__cuda_callable__ constexpr Complex & | operator= (const Value &v)
template<typename Value_>
__cuda_callable__ constexpr Complex & | operator= (const Value_ &v)
__cuda_callable__ bool | operator== (const Complex< Value > &c) const
template<typename Value_>
__cuda_callable__ bool | operator== (const Complex< Value_ > &c) const
bool | operator== (const std::complex< Value > &c) const
template<typename Value_>
bool | operator== (const std::complex< Value_ > &c) const
__cuda_callable__ bool | operator== (const Value &v) const
template<typename Value_>
__cuda_callable__ std::enable_if_t< IsScalarType< Value_ >::value &&! is_complex_v< Value_ >, bool > | operator== (const Value_ &v) const
__cuda_callable__ Value & | real ()
__cuda_callable__ const Value & | real () const
__cuda_callable__ const Value & | real () const volatile
__cuda_callable__ Value & | real () volatile

## Protected Attributes
Value | imag_
Value | real_

## Detailed Description

template<typename Value = double>
struct TNL::Arithmetics::Complex< Value >

Implementation of complex types.

Warning: Only basic algebraic operations like addition, subtraction, multiplication and division are implemented currently.

Template Parameters

  Value | represents arithmetics of real numbers used for the construction of the complex number.

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

- src/TNL/Arithmetics/Complex.h