#include <Cpx.h>
Public Member Functions | |
| Cpx (const Cpx< aType > &cm) | |
| Cpx (double long real, double long imaginary) | |
| Cpx (double real, double imaginary) | |
| Cpx (long unsigned real, long unsigned imaginary) | |
| Cpx (long real, long imaginary) | |
| Cpx (int unsigned real, int unsigned imaginary) | |
| Cpx (int real, int imaginary) | |
| Cpx (short unsigned real, short unsigned imaginary) | |
| Cpx (short real, short imaginary) | |
| Cpx (char unsigned real, char unsigned imaginary) | |
| Cpx (char real, char imaginary) | |
| Cpx (float real, float imaginary) | |
| Cpx (const double long *ptr) | |
| Cpx (const double *ptr) | |
| Cpx (const long unsigned *ptr) | |
| Cpx (const long *ptr) | |
| Cpx (const int unsigned *ptr) | |
| Cpx (const int *ptr) | |
| Cpx (const short unsigned *ptr) | |
| Cpx (const short *ptr) | |
| Cpx (const char unsigned *ptr) | |
| Cpx (const char *ptr) | |
| Cpx (const float *ptr) | |
| Cpx (double long real) | |
| Cpx (double real) | |
| Cpx (long unsigned real) | |
| Cpx (long real) | |
| Cpx (int unsigned real) | |
| Cpx (int real) | |
| Cpx (short unsigned real) | |
| Cpx (short real) | |
| Cpx (char unsigned real) | |
| Cpx (char real) | |
| Cpx (float real) | |
| Cpx (void) | |
| aType | magnitude (void) const |
| aType | magnitude2 (void) const |
| Cpx< aType > | operator * (const Cpx< aType > &cm) const |
| Cpx< aType > | operator * (aType scalar) const |
| const Cpx< aType > | operator *= (const Cpx< aType > &cm) |
| const Cpx< aType > | operator *= (aType scalar) |
| operator aType * (void) | |
| bool | operator!= (aType scalar) const |
| bool | operator!= (const Cpx< aType > &cm) const |
| Cpx< aType > | operator+ (const Cpx< aType > &cm) const |
| Cpx< aType > | operator+ (aType scalar) const |
| Cpx< aType > | operator+ (void) const |
| const Cpx< aType > | operator+= (const Cpx< aType > &cm) |
| const Cpx< aType > | operator+= (aType scalar) |
| Cpx< aType > | operator- (const Cpx< aType > &cm) const |
| Cpx< aType > | operator- (aType scalar) const |
| Cpx< aType > | operator- (void) const |
| const Cpx< aType > | operator-= (const Cpx< aType > &cm) |
| const Cpx< aType > | operator-= (double scalar) |
| Cpx< aType > | operator/ (aType scalar) const |
| Cpx< aType > | operator/ (const Cpx< aType > &cm) const |
| const Cpx< aType > | operator/= (aType scalar) |
| const Cpx< aType > | operator/= (const Cpx< aType > &cm) |
| bool | operator< (const Cpx< aType > &cm) const |
| bool | operator<= (const Cpx< aType > &cm) const |
| const Cpx< aType > | operator= (const Cpx< aType > &cm) |
| bool | operator== (aType scalar) const |
| bool | operator== (const Cpx< aType > &cm) const |
| bool | operator> (const Cpx< aType > &cm) const |
| bool | operator>= (const Cpx< aType > &cm) const |
| Cpx< aType > | operator~ (void) const |
| std::ostream & | stream (std::ostream &ostr) const |
| ~Cpx (void) | |
Public Attributes | |
| aType | im |
| aType | re |
Static Public Attributes | |
| static const aType | LN10 = 2.302585092994045684017991 |
| static const aType | PI = 3.141592653589793238462643 |
Friends | |
| template<class bType> | |
| Cpx< bType > | acos (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | acosh (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | asin (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | asinh (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | atan (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | atanh (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | ceil (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | cos (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | cosh (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | exp (const Cpx< bType > &cm) |
| template<class bType> | |
| bType | fabs (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | floor (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | log (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | log10 (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | operator * (bType scalar, const Cpx< bType > &cm) |
| template<class bType> | |
| bool | operator!= (bType scalar, const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | operator+ (bType scalar, const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | operator- (bType scalar, const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | operator/ (bType scalar, const Cpx< bType > &cm) |
| template<class bType> | |
| std::ostream & | operator<< (std::ostream &ostr, const Cpx< bType > &cm) |
| template<class bType> | |
| bool | operator== (bType scalar, const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | pow (const Cpx< bType > &cm, const Cpx< bType > &cx) |
| template<class bType> | |
| Cpx< bType > | pow (const Cpx< bType > &cm, bType scalar) |
| template<class bType> | |
| Cpx< bType > | pow (bType scalar, const Cpx< bType > &cx) |
| template<class bType> | |
| Cpx< bType > | sin (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | sinh (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | sqrt (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | tan (const Cpx< bType > &cm) |
| template<class bType> | |
| Cpx< bType > | tanh (const Cpx< bType > &cm) |
Value storage with in this complex object uses <aType> variable declarations. All angular phase evaluations of complex values occur within the range of negative Cpx::PI to positive Cpx::PI.
See the cited References to obtain more information on the mathematical theory applied here.
example_Cheb.txt, example_Intg.txt, example_Mtx.txt, and example_Ode.txt.
| Cpx | ( | void | ) |
Constructor initializes a complex object with zero real and imaginary values.
| Cpx | ( | float | real | ) |
Overloaded constructor initializes a complex object with the specified real value and a zero imaginary value.
| real | real value of complex number |
| Cpx | ( | char | real | ) |
Overloaded constructor initializes a complex object with the specified real value and a zero imaginary value.
| real | real value of complex number |
| Cpx | ( | char unsigned | real | ) |
Overloaded constructor initializes a complex object with the specified real value and a zero imaginary value.
| real | real value of complex number |
| Cpx | ( | short | real | ) |
Overloaded constructor initializes a complex object with the specified real value and a zero imaginary value.
| real | real value of complex number |
| Cpx | ( | short unsigned | real | ) |
Overloaded constructor initializes a complex object with the specified real value and a zero imaginary value.
| real | real value of complex number |
| Cpx | ( | int | real | ) |
Overloaded constructor initializes a complex object with the specified real value and a zero imaginary value.
| real | real value of complex number |
| Cpx | ( | int unsigned | real | ) |
Overloaded constructor initializes a complex object with the specified real value and a zero imaginary value.
| real | real value of complex number |
| Cpx | ( | long | real | ) |
Overloaded constructor initializes a complex object with the specified real value and a zero imaginary value.
| real | real value of complex number |
| Cpx | ( | long unsigned | real | ) |
Overloaded constructor initializes a complex object with the specified real value and a zero imaginary value.
| real | real value of complex number |
| Cpx | ( | double | real | ) |
Overloaded constructor initializes a complex object with the specified real value and a zero imaginary value.
| real | real value of complex number |
| Cpx | ( | double long | real | ) |
Overloaded constructor initializes a complex object with the specified real value and a zero imaginary value.
| real | real value of complex number |
| Cpx | ( | const float * | ptr | ) |
Overloaded constructor initializes a complex object with the specified array of a real value followed by an imaginary value.
| ptr | pointer to a 2-value array defining a complex number |
| Cpx | ( | const char * | ptr | ) |
Overloaded constructor initializes a complex object with the specified array of a real value followed by an imaginary value.
| ptr | pointer to a 2-value array defining a complex number |
| Cpx | ( | const char unsigned * | ptr | ) |
Overloaded constructor initializes a complex object with the specified array of a real value followed by an imaginary value.
| ptr | pointer to a 2-value array defining a complex number |
| Cpx | ( | const short * | ptr | ) |
Overloaded constructor initializes a complex object with the specified array of a real value followed by an imaginary value.
| ptr | pointer to a 2-value array defining a complex number |
| Cpx | ( | const short unsigned * | ptr | ) |
Overloaded constructor initializes a complex object with the specified array of a real value followed by an imaginary value.
| ptr | pointer to a 2-value array defining a complex number |
| Cpx | ( | const int * | ptr | ) |
Overloaded constructor initializes a complex object with the specified array of a real value followed by an imaginary value.
| ptr | pointer to a 2-value array defining a complex number |
| Cpx | ( | const int unsigned * | ptr | ) |
Overloaded constructor initializes a complex object with the specified array of a real value followed by an imaginary value.
| ptr | pointer to a 2-value array defining a complex number |
| Cpx | ( | const long * | ptr | ) |
Overloaded constructor initializes a complex object with the specified array of a real value followed by an imaginary value.
| ptr | pointer to a 2-value array defining a complex number |
| Cpx | ( | const long unsigned * | ptr | ) |
Overloaded constructor initializes a complex object with the specified array of a real value followed by an imaginary value.
| ptr | pointer to a 2-value array defining a complex number |
| Cpx | ( | const double * | ptr | ) |
Overloaded constructor initializes a complex object with the specified array of a real value followed by an imaginary value.
| ptr | pointer to a 2-value array defining a complex number |
| Cpx | ( | const double long * | ptr | ) |
Overloaded constructor initializes a complex object with the specified array of a real value followed by an imaginary value.
| ptr | pointer to a 2-value array defining a complex number |
| Cpx | ( | float | real, | |
| float | imaginary | |||
| ) |
Overloaded constructor initializes a complex object with the specified real and imaginary values.
| real | real value of complex number | |
| imaginary | imaginary value of complex number |
| Cpx | ( | char | real, | |
| char | imaginary | |||
| ) |
Overloaded constructor initializes a complex object with the specified real and imaginary values.
| real | real value of complex number | |
| imaginary | imaginary value of complex number |
| Cpx | ( | char unsigned | real, | |
| char unsigned | imaginary | |||
| ) |
Overloaded constructor initializes a complex object with the specified real and imaginary values.
| real | real value of complex number | |
| imaginary | imaginary value of complex number |
| Cpx | ( | short | real, | |
| short | imaginary | |||
| ) |
Overloaded constructor initializes a complex object with the specified real and imaginary values.
| real | real value of complex number | |
| imaginary | imaginary value of complex number |
| Cpx | ( | short unsigned | real, | |
| short unsigned | imaginary | |||
| ) |
Overloaded constructor initializes a complex object with the specified real and imaginary values.
| real | real value of complex number | |
| imaginary | imaginary value of complex number |
| Cpx | ( | int | real, | |
| int | imaginary | |||
| ) |
Overloaded constructor initializes a complex object with the specified real and imaginary values.
| real | real value of complex number | |
| imaginary | imaginary value of complex number |
| Cpx | ( | int unsigned | real, | |
| int unsigned | imaginary | |||
| ) |
Overloaded constructor initializes a complex object with the specified real and imaginary values.
| real | real value of complex number | |
| imaginary | imaginary value of complex number |
| Cpx | ( | long | real, | |
| long | imaginary | |||
| ) |
Overloaded constructor initializes a complex object with the specified real and imaginary values.
| real | real value of complex number | |
| imaginary | imaginary value of complex number |
| Cpx | ( | long unsigned | real, | |
| long unsigned | imaginary | |||
| ) |
Overloaded constructor initializes a complex object with the specified real and imaginary values.
| real | real value of complex number | |
| imaginary | imaginary value of complex number |
| Cpx | ( | double | real, | |
| double | imaginary | |||
| ) |
Overloaded constructor initializes a complex object with the specified real and imaginary values.
| real | real value of complex number | |
| imaginary | imaginary value of complex number |
| Cpx | ( | double long | real, | |
| double long | imaginary | |||
| ) |
Overloaded constructor initializes a complex object with the specified real and imaginary values.
| real | real value of complex number | |
| imaginary | imaginary value of complex number |
Overloaded copy constructor initializes a complex object from the specified existing complex object.
| cm | a reference to a complex object |
| ~Cpx | ( | void | ) |
Destructor is a place holder, no dynamic memory is allocated.
| aType magnitude | ( | void | ) | const |
Function calculates the magnitude of the complex object.
| aType magnitude2 | ( | void | ) | const |
Function calculates the squared magnitude of the complex object.
Function overloads the multiplication operator *. The function finds the product of two complex numbers.
| cm | a complex object to multiply |
| Cpx<aType> operator * | ( | aType | scalar | ) | const |
Function overloads the multiplication operator *. The function multiplies a complex number by a scalar.
| scalar | a value to multiply |
Function overloads the multiplication assignment operator *=. The function finds the product of two complex numbers, and stores the results into the specified complex object.
| cm | a complex object to multiply |
| const Cpx<aType> operator *= | ( | aType | scalar | ) |
Function overloads the multiplication assignment operator *=. The function multiplies a complex number by a scalar, and stores the results into the specified complex object.
| scalar | a value to multiply |
| operator aType * | ( | void | ) |
Conversion function returns a pointer to the complex object.
aType cm[2]; | bool operator!= | ( | aType | scalar | ) | const |
Function overloads the inequality operator !=. The function compares the value of a complex number and a scalar number.
| scalar | a floating point number to compare |
| bool operator!= | ( | const Cpx< aType > & | cm | ) | const |
Function overloads the inequality operator !=. The function compares the values of two complex objects.
| cm | a complex object to compare |
Function overloads the addition operator +. The function finds the sum of two complex numbers.
| cm | a complex object to be added |
| Cpx<aType> operator+ | ( | aType | scalar | ) | const |
Function overloads the addition operator +. The function finds the sum of a complex number and a scalar.
| scalar | a value to be added |
| Cpx<aType> operator+ | ( | void | ) | const |
Function overloads the addition operator +. The function returns a copy of the complex number.
Function overloads the addition assignment operator +=. The function finds the sum of two complex numbers, and stores the results into the specified complex object.
| cm | a complex object to be added |
| const Cpx<aType> operator+= | ( | aType | scalar | ) |
Function overloads the addition assignment operator +=. The function finds the sum of a complex number and a scalar, and stores the results into the specified complex object.
| scalar | a value to be added |
Function overloads the subtraction operator -. The function finds the difference between two complex numbers.
| cm | a complex number object to be subtracted |
| Cpx<aType> operator- | ( | aType | scalar | ) | const |
Function overloads the subtraction operator -. The function finds the difference between a complex number and a scalar.
| scalar | a value to be subtracted |
| Cpx<aType> operator- | ( | void | ) | const |
Function overloads the subtraction operator -. The function finds the negative of a complex number.
Function overloads the subtraction assignment operator -=. The function finds the difference between two complex numbers, and stores the results into the specified complex object.
| cm | a complex object to be subtracted |
| const Cpx<aType> operator-= | ( | double | scalar | ) |
Function overloads the subtraction assignment operator -=. The function finds the difference between a complex number and a scalar, and stores the results into the specified complex object.
| scalar | a value to be subtracted |
| Cpx<aType> operator/ | ( | aType | scalar | ) | const |
Function overloads the division operator /. The function divides a complex number by a scalar.
| scalar | a value to divide by |
Function overloads the division operator /. The function divides a complex number by a complex number.
| cm | a complex object to divide by |
| const Cpx<aType> operator/= | ( | aType | scalar | ) |
Function overloads the division assignment operator /=. The function divides a complex number by a scalar, and stores the results into the specified complex object.
| scalar | a value to divide by |
Function overloads the division assignment operator /. The function divides a complex number by a complex number, and stores the results into the specified complex object.
| cm | a complex object to divide by |
| bool operator< | ( | const Cpx< aType > & | cm | ) | const |
Function overloads the less-than operator <. The function compares the values of two complex objects.
| cm | a complex object to compare |
| bool operator<= | ( | const Cpx< aType > & | cm | ) | const |
Function overloads the less-than-or-equal operator <=. The function compares the values of two complex objects.
| cm | a complex object to compare |
Function overloads the assignment operator =. The function copies the complex object to an existing complex object.
| cm | a complex object to be copied |
| bool operator== | ( | aType | scalar | ) | const |
Function overloads the equality operator ==. The function compares the value of a complex number and a scalar number.
| scalar | a floating point number to compare |
| bool operator== | ( | const Cpx< aType > & | cm | ) | const |
Function overloads the equality operator ==. The function compares the values of two complex objects.
| cm | a complex object to compare |
| bool operator> | ( | const Cpx< aType > & | cm | ) | const |
Function overloads the greater-than operator >. The function compares the values of two complex objects.
| cm | a complex object to compare |
| bool operator>= | ( | const Cpx< aType > & | cm | ) | const |
Function overloads the less-than-or-equal operator <=. The function compares the values of two complex objects.
| cm | a complex object to compare |
| Cpx<aType> operator~ | ( | void | ) | const |
Function overloads the bitwise negation operator ~. The function finds the complex conjugate of a complex object.
| std::ostream& stream | ( | std::ostream & | ostr | ) | const |
Function prints values of the complex number to the specified stream in the standard format.
| ostr | a reference to a stream |
Function overloads the <cmath> library function std::acos(). The function calculates the inverse trigonometric cosine value of a complex number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::acosh(). The function calculates the inverse hyberbolic cosine value of a complex number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::asin(). The function calculates the inverse trigonometric sine value of a complex number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::asinh(). The function calculates the inverse hyberbolic sine value of a complex number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::atan(). The function calculates the inverse trigonometric tangent value of a complex number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::atanh(). The function calculates the inverse hyberbolic tangent value of a complex number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::ceil(). The function rounds up each part of the complex number to the nearest whole number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::cos(). The function calculates the trigonometric cosine value of a complex number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::cosh(). The function calculates the hyberbolic cosine value of a complex number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::exp(). The function calculates the exponential of a complex number.
| cm | a reference to a complex object |
| bType fabs | ( | const Cpx< bType > & | cm | ) | [friend] |
Function overloads the <cmath> library function std::fabs(). The function calculates the magnitude of a complex number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::floor(). The function rounds down each part of the complex number to the nearest whole number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::log(). The function calculates the natural logarithm of a complex number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::log10(). The function determines the base-10 logarithm of a complex number.
| cm | a complex object to be multiplied |
Function overloads the multiplication operator *. The function multiplies a scalar times a complex number.
| scalar | a value to multiply | |
| cm | a complex object to be multiplied |
| bool operator!= | ( | bType | scalar, | |
| const Cpx< bType > & | cm | |||
| ) | [friend] |
Function overloads the inequality operator !=. The function compares the value of a complex number and a real number.
| scalar | a floating point number to compare | |
| cm | a complex object to be compared |
Function overloads the addition operator +. The function finds the sum of a complex number and a scalar.
| scalar | a value to be added | |
| cm | a complex object to be added |
Function overloads the subtraction operator -. The function finds the difference between a scalar and a complex number.
| scalar | a value to subtract | |
| cm | a complex object to be subtracted |
Function overloads the division operator /. The function divides a scalar by a complex number.
| scalar | a value to divide | |
| cm | a complex object to divide by |
| std::ostream& operator<< | ( | std::ostream & | ostr, | |
| const Cpx< bType > & | cm | |||
| ) | [friend] |
Function overloads the bitwise left shift operator <<. The function prints the specified complex number to the specified stream.
| ostr | a reference to a stream | |
| cm | a reference to a complex object |
| bool operator== | ( | bType | scalar, | |
| const Cpx< bType > & | cm | |||
| ) | [friend] |
Function overloads the equality operator ==. The function compares the value of a complex number and a real number.
| scalar | a floating point number to compare | |
| cm | a complex object to be compared |
Function overloads the <cmath> library function std::pow(). The function calculates the value of a complex value raised to a complex valued power.
| cm | a reference to a complex valued number (mantissa) | |
| cx | a reference to a complex valued number (exponent) |
Function overloads the <cmath> library function std::pow(). The function calculates the value of a complex value raised to a real valued power.
| cm | a reference to a complex valued number (mantissa) | |
| scalar | a real valued number (exponent) |
Function overloads the <cmath> library function std::pow(). The function calculates the value of a real number raised to a complex power.
| scalar | a real valued number (mantissa) | |
| cx | a reference to a complex valued number (exponent) |
Function overloads the <cmath> library function std::sin(). The function calculates the trigonometric sine value of a complex number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::sinh(). The function calculates the hyberbolic sine value of a complex number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::sqrt(). The function calculates the value of a complex value raised to the one-half power.
| cm | a reference to a complex valued number |
Function overloads the <cmath> library function std::tan(). The function calculates the trigonometric tangent value of a complex number.
| cm | a reference to a complex object |
Function overloads the <cmath> library function std::tanh(). The function calculates the hyberbolic tangent value of a complex number.
| cm | a reference to a complex object |
| aType im |
imaginary value of complex number
const aType LN10 = 2.302585092994045684017991 [static] |
natural logarithm of ten
const aType PI = 3.141592653589793238462643 [static] |
circle circumference:diameter ratio
| aType re |
real value of complex number
1.4.7