REST-for-Physics
v2.3
Rare Event Searches ToolKit for Physics
|
A generic class to handle complex numbers with real precision.
TRestComplex is a class that defines static methods with mathematical operations using complex numbers. This class has been generated by refurbishing the existing ROOT TComplex object and updating the double type by real MPFR types that allow to define an arbitrary precision.
It is possible to redefine the numbers precision as number of digits using TRestComplex::SetPrecision.
Code example inside restRoot
:
RESTsoft - Software for Rare Event Searches with TPCs
History of developments:
2016-December: First concept. Javier Galan
Definition at line 33 of file TRestComplex.h.
#include <TRestComplex.h>
Public Member Functions | |
mpfr::mpreal | Im () const |
operator Double_t () const | |
operator Float_t () const | |
operator Int_t () const | |
TRestComplex | operator() (mpfr::mpreal x, mpfr::mpreal y, Bool_t polar=kFALSE) |
TRestComplex | operator* (const TRestComplex &c) const |
TRestComplex | operator* (mpfr::mpreal c) const |
TRestComplex | operator*= (const TRestComplex &c) |
TRestComplex | operator+ () |
TRestComplex | operator+ (const TRestComplex &c) const |
TRestComplex | operator+ (mpfr::mpreal c) const |
TRestComplex | operator+= (const TRestComplex &c) |
TRestComplex | operator- () |
TRestComplex | operator- (const TRestComplex &c) const |
TRestComplex | operator- (mpfr::mpreal c) const |
TRestComplex | operator-= (const TRestComplex &c) |
TRestComplex | operator/ (const TRestComplex &c) const |
TRestComplex | operator/ (mpfr::mpreal c) const |
TRestComplex | operator/= (const TRestComplex &c) |
mpfr::mpreal | Re () const |
mpfr::mpreal | Rho () const |
mpfr::mpreal | Rho2 () const |
int | Sign (const mpfr::mpreal &re, const mpfr::mpreal &im) |
mpfr::mpreal | Theta () const |
TRestComplex (mpfr::mpreal re, mpfr::mpreal im=0, Bool_t polar=kFALSE) | |
Standard constructor. More... | |
Protected Attributes | |
mpfr::mpreal | fIm = 0 |
The imaginary part of the complex number using MPFR precision. More... | |
mpfr::mpreal | fRe = 1 |
The real part of the complex number using MPFR precision. More... | |
Friends | |
TRestComplex | operator* (Double_t d, const TRestComplex &c) |
TRestComplex | operator+ (Double_t d, const TRestComplex &c) |
TRestComplex | operator- (Double_t d, const TRestComplex &c) |
TRestComplex | operator/ (Double_t d, const TRestComplex &c) |
std::ostream & | operator<< (std::ostream &out, const TRestComplex &c) |
std::istream & | operator>> (std::istream &in, TRestComplex &c) |
|
inline |
Definition at line 42 of file TRestComplex.h.
TRestComplex::TRestComplex | ( | mpfr::mpreal | re, |
mpfr::mpreal | im = 0 , |
||
Bool_t | polar = kFALSE |
||
) |
Standard constructor.
Definition at line 77 of file TRestComplex.cxx.
|
inlinevirtual |
Definition at line 44 of file TRestComplex.h.
|
inlinestatic |
Definition at line 181 of file TRestComplex.h.
|
inlinestatic |
MUST be implemented
Definition at line 149 of file TRestComplex.h.
|
inlinestatic |
MUST be implemented
Definition at line 174 of file TRestComplex.h.
|
inlinestatic |
MUST be implemented
Definition at line 144 of file TRestComplex.h.
|
inlinestatic |
MUST be implemented
Definition at line 169 of file TRestComplex.h.
|
inlinestatic |
Definition at line 154 of file TRestComplex.h.
|
inlinestatic |
Definition at line 179 of file TRestComplex.h.
|
inlinestatic |
Definition at line 209 of file TRestComplex.h.
|
inlinestatic |
Definition at line 131 of file TRestComplex.h.
|
inlinestatic |
Definition at line 161 of file TRestComplex.h.
|
inlinestatic |
Definition at line 121 of file TRestComplex.h.
|
inlinestatic |
Definition at line 50 of file TRestComplex.h.
|
inlinestatic |
Definition at line 53 of file TRestComplex.h.
|
inline |
Definition at line 58 of file TRestComplex.h.
|
inlinestatic |
Definition at line 200 of file TRestComplex.h.
|
inlinestatic |
Definition at line 122 of file TRestComplex.h.
|
inlinestatic |
Definition at line 126 of file TRestComplex.h.
|
inlinestatic |
Definition at line 125 of file TRestComplex.h.
|
inlinestatic |
Definition at line 205 of file TRestComplex.h.
|
inlinestatic |
Definition at line 202 of file TRestComplex.h.
|
inlinestatic |
Definition at line 208 of file TRestComplex.h.
|
inlinestatic |
Definition at line 54 of file TRestComplex.h.
|
inline |
Definition at line 112 of file TRestComplex.h.
|
inline |
Definition at line 113 of file TRestComplex.h.
|
inline |
Definition at line 114 of file TRestComplex.h.
|
inline |
Definition at line 62 of file TRestComplex.h.
|
inline |
Definition at line 74 of file TRestComplex.h.
|
inline |
Definition at line 92 of file TRestComplex.h.
|
inline |
Definition at line 83 of file TRestComplex.h.
|
inline |
Definition at line 89 of file TRestComplex.h.
|
inline |
Definition at line 77 of file TRestComplex.h.
|
inline |
Definition at line 93 of file TRestComplex.h.
|
inline |
Definition at line 84 of file TRestComplex.h.
|
inline |
Definition at line 88 of file TRestComplex.h.
|
inline |
Definition at line 81 of file TRestComplex.h.
|
inline |
Definition at line 95 of file TRestComplex.h.
|
inline |
Definition at line 86 of file TRestComplex.h.
|
inline |
Definition at line 78 of file TRestComplex.h.
|
inline |
Definition at line 94 of file TRestComplex.h.
|
inline |
Definition at line 85 of file TRestComplex.h.
|
inlinestatic |
Definition at line 183 of file TRestComplex.h.
|
inlinestatic |
Definition at line 196 of file TRestComplex.h.
|
inlinestatic |
Definition at line 188 of file TRestComplex.h.
|
inlinestatic |
Definition at line 191 of file TRestComplex.h.
|
inlinestatic |
Definition at line 210 of file TRestComplex.h.
|
inline |
Definition at line 57 of file TRestComplex.h.
|
inline |
Definition at line 59 of file TRestComplex.h.
|
inline |
Definition at line 60 of file TRestComplex.h.
|
inlinestatic |
Definition at line 46 of file TRestComplex.h.
|
inline |
MUST be implemented
Definition at line 139 of file TRestComplex.h.
|
inlinestatic |
Definition at line 128 of file TRestComplex.h.
|
inlinestatic |
Definition at line 158 of file TRestComplex.h.
|
inlinestatic |
Definition at line 117 of file TRestComplex.h.
|
inlinestatic |
Definition at line 134 of file TRestComplex.h.
|
inlinestatic |
Definition at line 164 of file TRestComplex.h.
|
inline |
Definition at line 61 of file TRestComplex.h.
|
friend |
Definition at line 98 of file TRestComplex.h.
|
friend |
Definition at line 101 of file TRestComplex.h.
|
friend |
Definition at line 107 of file TRestComplex.h.
|
friend |
Definition at line 104 of file TRestComplex.h.
|
friend |
Definition at line 89 of file TRestComplex.cxx.
|
friend |
Definition at line 105 of file TRestComplex.cxx.
|
protected |
The imaginary part of the complex number using MPFR precision.
Definition at line 38 of file TRestComplex.h.
|
protected |
The real part of the complex number using MPFR precision.
Definition at line 36 of file TRestComplex.h.