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. | |
Static Public Member Functions | |
static mpfr::mpreal | Abs (const TRestComplex &c) |
static TRestComplex | ACos (const TRestComplex &c) |
static TRestComplex | ACosH (const TRestComplex &c) |
static TRestComplex | ASin (const TRestComplex &c) |
static TRestComplex | ASinH (const TRestComplex &c) |
static TRestComplex | ATan (const TRestComplex &c) |
static TRestComplex | ATanH (const TRestComplex &c) |
static TRestComplex | Conjugate (const TRestComplex &c) |
static TRestComplex | Cos (const TRestComplex &c) |
static TRestComplex | CosH (const TRestComplex &c) |
static TRestComplex | Exp (const TRestComplex &c) |
static int | GetPrecision () |
static TRestComplex | I () |
static Int_t | IsNaN (const TRestComplex &c) |
static TRestComplex | Log (const TRestComplex &c) |
static TRestComplex | Log10 (const TRestComplex &c) |
static TRestComplex | Log2 (const TRestComplex &c) |
static TRestComplex | Max (const TRestComplex &a, const TRestComplex &b) |
static TRestComplex | Min (const TRestComplex &a, const TRestComplex &b) |
static TRestComplex | Normalize (const TRestComplex &c) |
static TRestComplex | One () |
static TRestComplex | Power (const TRestComplex &x, const TRestComplex &y) |
static TRestComplex | Power (const TRestComplex &x, Int_t y) |
static TRestComplex | Power (const TRestComplex &x, mpfr::mpreal y) |
static TRestComplex | Power (mpfr::mpreal x, const TRestComplex &y) |
static TRestComplex | Range (const TRestComplex &lb, const TRestComplex &ub, const TRestComplex &c) |
static void | SetPrecision (Int_t precision) |
static TRestComplex | Sin (const TRestComplex &c) |
static TRestComplex | SinH (const TRestComplex &c) |
static TRestComplex | Sqrt (const TRestComplex &c) |
static TRestComplex | Tan (const TRestComplex &c) |
static TRestComplex | TanH (const TRestComplex &c) |
Protected Attributes | |
mpfr::mpreal | fIm = 0 |
The imaginary part of the complex number using MPFR precision. | |
mpfr::mpreal | fRe = 1 |
The real part of the complex number using MPFR precision. | |
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) |
|
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.
|
inline |
MUST be implemented
Definition at line 139 of file TRestComplex.h.