Quartic roots
Utilities for C++ programming
Loading...
Searching...
No Matches
PolynomialRoots::real_complex Class Reference

Lightweight complex number type used by the standard-precision solvers. More...

#include <PolynomialRoots-complex.hxx>

Public Member Functions

real_type const & real () const
 Return the real part.
real_type const & imag () const
 Return the imaginary part.
 real_complex ()=default
 Build the zero complex number.
 real_complex (real_type real_part, real_type imag_part=0)
 Build a complex number from real and imaginary parts.
real_complexoperator+= (real_type rhs)
 Add a real scalar in place.
real_complexoperator+= (real_complex const &rhs)
 Add a complex number in place.
real_complexoperator-= (real_type rhs)
 Subtract a real scalar in place.
real_complexoperator-= (real_complex const &rhs)
 Subtract a complex number in place.
real_complexoperator*= (real_type rhs)
 Multiply by a real scalar in place.
real_complexoperator*= (real_complex const &rhs)
 Multiply by a complex number in place.
real_complexoperator/= (real_type rhs)
 Divide by a real scalar in place.
real_complexoperator/= (real_complex const &rhs)
 Divide by a complex number in place using a scaled algorithm.

Static Public Member Functions

static real_type abs_real (real_type x)
 Return the absolute value of a real scalar.

Detailed Description

Lightweight complex number type used by the standard-precision solvers.

Constructor & Destructor Documentation

◆ real_complex() [1/2]

PolynomialRoots::real_complex::real_complex ( )
default

Build the zero complex number.

◆ real_complex() [2/2]

PolynomialRoots::real_complex::real_complex ( real_type real_part,
real_type imag_part = 0 )
inline

Build a complex number from real and imaginary parts.

Member Function Documentation

◆ abs_real()

real_type PolynomialRoots::real_complex::abs_real ( real_type x)
inlinestatic

Return the absolute value of a real scalar.

◆ imag()

real_type const & PolynomialRoots::real_complex::imag ( ) const
inline

Return the imaginary part.

◆ operator*=() [1/2]

real_complex & PolynomialRoots::real_complex::operator*= ( real_complex const & rhs)
inline

Multiply by a complex number in place.

◆ operator*=() [2/2]

real_complex & PolynomialRoots::real_complex::operator*= ( real_type rhs)
inline

Multiply by a real scalar in place.

◆ operator+=() [1/2]

real_complex & PolynomialRoots::real_complex::operator+= ( real_complex const & rhs)
inline

Add a complex number in place.

◆ operator+=() [2/2]

real_complex & PolynomialRoots::real_complex::operator+= ( real_type rhs)
inline

Add a real scalar in place.

◆ operator-=() [1/2]

real_complex & PolynomialRoots::real_complex::operator-= ( real_complex const & rhs)
inline

Subtract a complex number in place.

◆ operator-=() [2/2]

real_complex & PolynomialRoots::real_complex::operator-= ( real_type rhs)
inline

Subtract a real scalar in place.

◆ operator/=() [1/2]

real_complex & PolynomialRoots::real_complex::operator/= ( real_complex const & rhs)
inline

Divide by a complex number in place using a scaled algorithm.

◆ operator/=() [2/2]

real_complex & PolynomialRoots::real_complex::operator/= ( real_type rhs)
inline

Divide by a real scalar in place.

◆ real()

real_type const & PolynomialRoots::real_complex::real ( ) const
inline

Return the real part.


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