![]() |
Stan Math Library
5.1.0
Automatic Differentiation
|
Specialization of the standard library complex number type for reverse-mode autodiff type stan::math::var.
Definition at line 17 of file std_complex.hpp.
#include <std_complex.hpp>
Inheritance diagram for std::complex< stan::math::var >:Public Types | |
| using | base_t = stan::math::complex_base< stan::math::var > |
| using | value_type = stan::math::var |
| Type of real and imaginary parts. | |
| using | complex_type = std::complex< value_type > |
| Derived complex type used for function return types. | |
Public Member Functions | |
| complex ()=default | |
| Construct a complex number with zero real and imaginary parts. | |
| template<typename U , typename V > | |
| complex (const U &re, const V &im) | |
| Construct a complex number from real and imaginary parts. | |
| template<typename U , typename = stan::require_stan_scalar_t<U>> | |
| complex (const U &re) | |
| Construct a complex number with specified real part and zero imaginary part. | |
| template<typename U > | |
| complex (const std::complex< U > &z) | |
| template<typename U , typename = stan::require_arithmetic_t<U>> | |
| auto & | operator= (const std::complex< U > &x) |
| Set the real and imaginary components of this complex number to those of the specified complex number. | |
| value_type | real () const |
| Return the real part. | |
| void | real (const value_type &re) |
| Set the real part to the specified value. | |
| value_type | imag () const |
| Return the imaginary part. | |
| void | imag (const value_type &im) |
| Set the imaginary part to the specified value. | |
| complex_type & | operator+= (const U &x) |
| Add specified real value to real part. | |
| complex_type & | operator+= (const std::complex< U > &other) |
| Adds specified complex number to this. | |
| complex_type & | operator-= (const U &x) |
| Subtracts specified real number from real part. | |
| complex_type & | operator-= (const std::complex< U > &other) |
| Subtracts specified complex number from this. | |
| complex_type & | operator*= (const U &x) |
| Multiplies this by the specified real number. | |
| complex_type & | operator*= (const std::complex< U > &other) |
| Multiplies this by specified complex number. | |
| complex_type & | operator/= (const U &x) |
| Divides this by the specified real number. | |
| complex_type & | operator/= (const std::complex< U > &other) |
| Divides this by the specified complex number. | |
Protected Member Functions | |
| complex_type & | derived () |
| Return this complex base cast to the complex type. | |
Protected Attributes | |
| value_type | re_ |
| Real part. | |
| value_type | im_ |
| Imaginary part. | |