#include <rcomplex.h>
Public Member Functions | |
| Rcomplex (IFloat a=0, IFloat b=0) | |
| Rcomplex (const Rcomplex &a) | |
| ~Rcomplex () | |
| Rcomplex & | operator= (const Rcomplex &a) |
| IFloat | real () const |
| Get the real part. | |
| IFloat | imag () const |
| Get the imaginary part. | |
| void | real (IFloat r) |
| Assign to the real part. | |
| void | imag (IFloat i) |
| Assign to the imaginary part. | |
| IFloat | norm () const |
| Returns the square norm of the complex number. | |
| IFloat | abs () const |
| Returns the norm (modulus) of the complex number. | |
| Rcomplex & | operator+= (const Rcomplex &a) |
| Overloaded complex sum. | |
| Rcomplex & | operator+= (IFloat a) |
| Overloaded real sum. | |
| Rcomplex & | operator-= (const Rcomplex &a) |
| Overloaded complex subtraction. | |
| Rcomplex & | operator-= (IFloat a) |
| Overloaded real subtraction. | |
| Rcomplex & | operator *= (const Rcomplex &a) |
| Overloaded complex multiplication. | |
| Rcomplex & | operator *= (IFloat a) |
| Overloaded real multiplication. | |
| Rcomplex & | operator/= (const Rcomplex &a) |
| Overloaded complex division. | |
| Rcomplex & | operator/= (IFloat a) |
| Overloaded real division. | |
Friends | |
| Rcomplex | conj (const Rcomplex &c) |
| Complex conjugation. | |
| Rcomplex | operator+ (const Rcomplex &c1, const Rcomplex &c2) |
| Complex addition. | |
| Rcomplex | operator+ (const Rcomplex &c, IFloat f) |
| Real addition. | |
| Rcomplex | operator+ (IFloat f, const Rcomplex &c) |
| Real addition. | |
| Rcomplex | operator- (const Rcomplex &c1, const Rcomplex &c2) |
| Complex subtraction. | |
| Rcomplex | operator- (const Rcomplex &c, IFloat f) |
| Real subtraction. | |
| Rcomplex | operator- (IFloat f, const Rcomplex &c) |
| Real subtraction. | |
| Rcomplex | operator * (const Rcomplex &c1, const Rcomplex &c2) |
| Complex multiplication. | |
| Rcomplex | operator * (const Rcomplex &c, IFloat f) |
| Real multiplication. | |
| Rcomplex | operator * (IFloat f, const Rcomplex &c) |
| Real multiplication. | |
| Rcomplex | operator/ (const Rcomplex &c1, const Rcomplex &c2) |
| Complex division. | |
| Rcomplex | operator/ (const Rcomplex &c, IFloat f) |
| Real division. | |
| Rcomplex | operator/ (IFloat f, const Rcomplex &c) |
| Real division. | |
| Rcomplex | operator- (const Rcomplex &c) |
| Unary negation. | |
| IFloat | real (const Rcomplex &c) |
| Real part. | |
| IFloat | imag (const Rcomplex &c) |
| Imaginary part. | |
| IFloat | norm (const Rcomplex &c) |
| Square norm. | |
| IFloat | abs (const Rcomplex &c) |
| Complex norm (modulus). | |
The usual operations, arithmetic and otherwise, on complex numbers are defined.
N.B. the friend functions do not actually reference private data or methods.
Definition at line 40 of file rcomplex.h.
|
||||||||||||
|
The complex number is initialised with zero real and imaginary parts by default. Definition at line 36 of file rcomplex.C. |
|
|
Definition at line 39 of file rcomplex.C. |
|
|
Definition at line 42 of file rcomplex.C. |
|
|
Returns the norm (modulus) of the complex number.
Definition at line 48 of file rcomplex.C. References cps::IFloat, and norm(). |
|
|
Assign to the imaginary part.
Definition at line 67 of file rcomplex.h. |
|
|
Get the imaginary part.
Definition at line 60 of file rcomplex.h. References cps::IFloat. Referenced by cps::WilsonVector::conj(), cps::FermionVectorTp::CopyWilsonMatSink(), cps::FermionVectorTp::CopyWilsonVec(), cps::WspectMesons::DiracAlgebra(), cps::Nuc3ptStru::InsertOp(), cps::DiracOp::MinResExt(), cps::WilsonMatrix::operator=(), cps::Nuc3pt::Print(), cps::Matrix::ProjSU3(), cps::qcdio_norm_row(), cps::Mom::run(), cps::QPropW::Run(), cps::AlgMom::run(), cps::AlgEig::run(), cps::AlgDens::run(), cps::twist_links(), cps::WilsonMatrix::WilsonMatrix(), and cps::WspectMomenta::WspectMomenta(). |
|
|
Returns the square norm of the complex number.
Definition at line 26 of file rcomplex_sun.C. References cps::IFloat. Referenced by abs(), and cps::DiracOpWilsonTypes::RitzEig(). |
|
|
Overloaded real multiplication.
Definition at line 59 of file rcomplex_sun.C. |
|
|
Overloaded complex multiplication.
Definition at line 51 of file rcomplex_sun.C. References cps::IFloat, im, and re. |
|
|
Overloaded real sum.
Definition at line 35 of file rcomplex_sun.C. |
|
|
Overloaded complex sum.
Definition at line 29 of file rcomplex_sun.C. |
|
|
Overloaded real subtraction.
Definition at line 46 of file rcomplex_sun.C. |
|
|
Overloaded complex subtraction.
Definition at line 40 of file rcomplex_sun.C. |
|
|
Overloaded real division.
Definition at line 74 of file rcomplex_sun.C. |
|
|
Overloaded complex division.
Definition at line 65 of file rcomplex_sun.C. References cps::IFloat, im, and re. |
|
|
Definition at line 45 of file rcomplex.C. |
|
|
Assign to the real part.
Definition at line 64 of file rcomplex.h. |
|
|
|
Complex norm (modulus).
Definition at line 161 of file rcomplex.h. |
|
|
Complex conjugation.
Definition at line 80 of file rcomplex_sun.C. |
|
|
Imaginary part.
Definition at line 157 of file rcomplex.h. |
|
|
Square norm.
Definition at line 159 of file rcomplex.h. |
|
||||||||||||
|
Real multiplication.
Definition at line 133 of file rcomplex.h. |
|
||||||||||||
|
Real multiplication.
Definition at line 129 of file rcomplex.h. |
|
||||||||||||
|
Complex multiplication.
Definition at line 125 of file rcomplex.h. |
|
||||||||||||
|
Real addition.
Definition at line 109 of file rcomplex.h. |
|
||||||||||||
|
Real addition.
Definition at line 105 of file rcomplex.h. |
|
||||||||||||
|
Complex addition.
Definition at line 101 of file rcomplex.h. |
|
|
Unary negation.
Definition at line 83 of file rcomplex_sun.C. |
|
||||||||||||
|
Real subtraction.
Definition at line 121 of file rcomplex.h. |
|
||||||||||||
|
Real subtraction.
Definition at line 117 of file rcomplex.h. |
|
||||||||||||
|
Complex subtraction.
Definition at line 113 of file rcomplex.h. |
|
||||||||||||
|
Real division.
Definition at line 145 of file rcomplex.h. |
|
||||||||||||
|
Real division.
Definition at line 141 of file rcomplex.h. |
|
||||||||||||
|
Complex division.
Definition at line 137 of file rcomplex.h. |
|
|
Real part.
Definition at line 155 of file rcomplex.h. |
1.3.9.1