xtensor
Loading...
Searching...
No Matches
Xt_xcomplex

Functions

template<class E >
decltype(autoxt::real (E &&e) noexcept
 Return an xt::xexpression representing the real part of the given expression.
 
template<class E >
decltype(autoxt::imag (E &&e) noexcept
 Return an xt::xexpression representing the imaginary part of the given expression.
 
template<class E >
auto xt::conj (E &&e) noexcept
 Return an xt::xfunction evaluating to the complex conjugate of the given expression.
 
template<class E >
auto xt::arg (E &&e) noexcept
 Calculates the phase angle (in radians) elementwise for the complex numbers in e.
 
template<class E >
auto xt::angle (E &&e, bool deg=false) noexcept
 Calculates the phase angle elementwise for the complex numbers in e.
 
template<class E >
auto xt::norm (E &&e) noexcept
 Calculates the squared magnitude elementwise for the complex numbers in e.
 

Detailed Description

Defined in xtensor/xcomplex.hpp

Function Documentation

◆ angle()

template<class E >
auto xt::angle ( E && e,
bool deg = false )
inlinenoexcept

Calculates the phase angle elementwise for the complex numbers in e.

Note that this function might be slightly less performant than xt::arg.

Parameters
ethe xt::xexpression
degcalculate angle in degrees instead of radians

Definition at line 238 of file xcomplex.hpp.

◆ arg()

template<class E >
auto xt::arg ( E && e)
inlinenoexcept

Calculates the phase angle (in radians) elementwise for the complex numbers in e.

Parameters
ethe xt::xexpression

Definition at line 221 of file xcomplex.hpp.

◆ conj()

template<class E >
auto xt::conj ( E && e)
inlinenoexcept

Return an xt::xfunction evaluating to the complex conjugate of the given expression.

Parameters
ethe xt::xexpression

Definition at line 207 of file xcomplex.hpp.

◆ imag()

template<class E >
decltype(auto) xt::imag ( E && e)
inlinenoexcept

Return an xt::xexpression representing the imaginary part of the given expression.

The returned expression either hold a const reference to e or a copy depending on whether e is an lvalue or an rvalue.

Template Parameters
eThe xt::xexpression

Definition at line 144 of file xcomplex.hpp.

◆ norm()

template<class E >
auto xt::norm ( E && e)
inlinenoexcept

Calculates the squared magnitude elementwise for the complex numbers in e.

Equivalent to xt::pow(xt::real(e), 2) + xt::pow(xt::imag(e), 2).

Parameters
ethe xt::xexpression

Definition at line 257 of file xcomplex.hpp.

◆ real()

template<class E >
decltype(auto) xt::real ( E && e)
inlinenoexcept

Return an xt::xexpression representing the real part of the given expression.

The returned expression either hold a const reference to e or a copy depending on whether e is an lvalue or an rvalue.

Template Parameters
eThe xt::xexpression

Definition at line 128 of file xcomplex.hpp.