CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
cbl::triplets::Triplet Class Referenceabstract

The class Triplet. More...

#include "Headers/Triplet.h"

Inheritance diagram for cbl::triplets::Triplet:

Public Member Functions

Member functions used to get private/protected parameters
Dim tripletDim () const
 get the dimension of the triplet vectors More...
 
TripletType tripletType () const
 get the triplet type More...
 
virtual double scale (const int i) const
 get the protected member m_scale[i] More...
 
virtual std::vector< double > scale () const
 get the protected member m_scale More...
 
virtual double TT1D (const int i) const
 get the private member m_TT1D[i] More...
 
virtual std::vector< double > TT1D () const
 get the private member m_TT1D More...
 
virtual double scale_D1 (const int i) const
 get the protected member m_scale_D1[i] More...
 
virtual std::vector< double > scale_D1 () const
 get the protected member m_scale_D1 More...
 
virtual double scale_D2 (const int i) const
 get the protected member m_scale_D2[i] More...
 
virtual std::vector< double > scale_D2 () const
 get the protected member m_scale_D2 More...
 
virtual double TT2D (const int i, const int j) const
 get the protected member m_TT2D[i] More...
 
virtual std::vector< std::vector< double > > TT2D () const
 get the protected member m_TT2D More...
 
virtual double r12 () const
 get the private member m_r12 More...
 
virtual double r12_binSize () const
 get the private member m_r12 More...
 
virtual double r13 () const
 get the private member m_side_u More...
 
virtual double r13_binSize () const
 get the private member m_side_u More...
 
virtual int nbins () const
 get the private member m_nbins More...
 
virtual double binSize () const
 get the private member m_binSize More...
 
virtual double r12_D1 () const
 get the protected member Triplet1D::m_r12_D1 More...
 
virtual double r12_binSize_D1 () const
 get the protected member Triplet1D::m_r12_binSize_D1 More...
 
virtual double r13_D1 () const
 get the protected member Triplet1D::m_r13_D1 More...
 
virtual double r13_binSize_D1 () const
 get the protected member Triplet1D::m_r13_binSize_D1 More...
 
virtual int nbins_D1 () const
 get the protected member Triplet1D::m_nbins_D1 More...
 
virtual double binSize_D1 () const
 get the protected member Triplet1D::m_binSize_D1 More...
 
virtual double r12_D2 () const
 get the protected member Triplet1D::m_r12_D1 More...
 
virtual double r12_binSize_D2 () const
 get the protected member Triplet1D::m_r12_binSize_D1 More...
 
virtual double r13_D2 () const
 get the protected member Triplet1D::m_r13_D2 More...
 
virtual double r13_binSize_D2 () const
 get the protected member Triplet1D::m_r13_binSize_D2 More...
 
virtual int nbins_D2 () const
 get the protected member Triplet1D::m_nbins_D2 More...
 
virtual double binSize_D2 () const
 get the protected member Triplet1D::m_binSize_D2 More...
 
Member functions used to set private/protected members
virtual void set_TT1D (const int i, const double tt)
 set the member m_TT1D[i] More...
 
virtual void add_TT1D (const int i, const double tt)
 set the protected member Triplet1D::m_TT1D[i] adding the number of triplets More...
 
Member functions used to handle object triplets (customized in all the derived classes)
virtual void get_triplet (const double r12, const double r13, const double r23, int &klin)=0
 estimate the distance between two objects and update the triplet vectors accordingly More...
 
virtual void set_triplet (const int klin, const double ww=1.)=0
 update the triplet More...
 
virtual void put (const double r12, const double r13, const double r23, const double ww=1.)=0
 estimate the distance between two objects and update the triplet vectors accordingly More...
 
virtual void put (const std::shared_ptr< catalogue::Object > obj1, const std::shared_ptr< catalogue::Object > obj2, const std::shared_ptr< catalogue::Object > obj3)=0
 estimate the distance between three objects and update the triplet vectors accordingly More...
 
virtual void Sum (const std::shared_ptr< Triplet > tt, const double ww=1.)=0
 sum the number of triplets More...
 

Protected Attributes

Dim m_tripletDim
 the dimension of the triplet vectors
 
TripletType m_tripletType
 triplet type
 

Private Member Functions

Member functions used to set the binning parameters

(customized in all the derived classes)

virtual void set_parameters ()=0
 set the binning parameters
 

Constructors/destructors

virtual ~Triplet ()
 default destructor
 
static std::shared_ptr< TripletCreate (const TripletType type, const double r12, const double r12_binSize, const double r13, const double r13_binSize, const int nbins)
 static factory used to construct triplets of any type More...
 

Detailed Description

The class Triplet.

This class is used to handle objects of type Triplet . It contains all virtual methods implemented in the derived classes Triplet2D and Triplet3D

Definition at line 133 of file Triplet.h.

Member Function Documentation

◆ add_TT1D()

virtual void cbl::triplets::Triplet::add_TT1D ( const int  i,
const double  tt 
)
inlinevirtual

set the protected member Triplet1D::m_TT1D[i] adding the number of triplets

Parameters
ithe bin index
ttthe number of triplets in the bin

Reimplemented in cbl::triplets::Triplet1D.

Definition at line 440 of file Triplet.h.

◆ binSize()

virtual double cbl::triplets::Triplet::binSize ( ) const
inlinevirtual

get the private member m_binSize

Returns
the bin size, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet1D.

Definition at line 320 of file Triplet.h.

◆ binSize_D1()

virtual double cbl::triplets::Triplet::binSize_D1 ( ) const
inlinevirtual

get the protected member Triplet1D::m_binSize_D1

Returns
the bin size in the first dimension, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 368 of file Triplet.h.

◆ binSize_D2()

virtual double cbl::triplets::Triplet::binSize_D2 ( ) const
inlinevirtual

get the protected member Triplet1D::m_binSize_D2

Returns
the bin size in the second dimension, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 416 of file Triplet.h.

◆ Create()

std::shared_ptr< Triplet > cbl::triplets::Triplet::Create ( const TripletType  type,
const double  r12,
const double  r12_binSize,
const double  r13,
const double  r13_binSize,
const int  nbins 
)
static

static factory used to construct triplets of any type

Parameters
typethe triplet type; it can be: _comoving_theta, _comoving_side
r12the size of r12
r12_binSizethe r12 bin size
r13the ratio r13
r13_binSizethe r12 bin size
nbinsthe number of bins
Returns
a pointer to an object of class Triplet of a given type

Definition at line 51 of file Triplet.cpp.

◆ get_triplet()

virtual void cbl::triplets::Triplet::get_triplet ( const double  r12,
const double  r13,
const double  r23,
int &  klin 
)
pure virtual

estimate the distance between two objects and update the triplet vectors accordingly

Parameters
r12distance between object1 and object2
r13distance between object1 and object3
r23distance between object2 and object3
klintriplet bin

Implemented in cbl::triplets::Triplet2D, cbl::triplets::Triplet1D_comoving_costheta, cbl::triplets::Triplet1D_comoving_side, cbl::triplets::Triplet1D_comoving_theta, and cbl::triplets::Triplet1D_multipoles_direct.

◆ nbins()

virtual int cbl::triplets::Triplet::nbins ( ) const
inlinevirtual

get the private member m_nbins

Returns
the number of bins, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet1D.

Definition at line 313 of file Triplet.h.

◆ nbins_D1()

virtual int cbl::triplets::Triplet::nbins_D1 ( ) const
inlinevirtual

get the protected member Triplet1D::m_nbins_D1

Returns
the number of bins the first dimension, or an error message if the derived object does not have this member

Definition at line 360 of file Triplet.h.

◆ nbins_D2()

virtual int cbl::triplets::Triplet::nbins_D2 ( ) const
inlinevirtual

get the protected member Triplet1D::m_nbins_D2

Returns
the number of bins the second dimension, or an error message if the derived object does not have this member

Definition at line 408 of file Triplet.h.

◆ put() [1/2]

virtual void cbl::triplets::Triplet::put ( const double  r12,
const double  r13,
const double  r23,
const double  ww = 1. 
)
pure virtual

estimate the distance between two objects and update the triplet vectors accordingly

Parameters
r12distance between object1 and object2
r13distance between object1 and object3
r23distance between object2 and object3
wwthe weight

Implemented in cbl::triplets::Triplet2D, cbl::triplets::Triplet1D_comoving_costheta, cbl::triplets::Triplet1D_comoving_side, cbl::triplets::Triplet1D_multipoles_direct, and cbl::triplets::Triplet1D_comoving_theta.

◆ put() [2/2]

virtual void cbl::triplets::Triplet::put ( const std::shared_ptr< catalogue::Object obj1,
const std::shared_ptr< catalogue::Object obj2,
const std::shared_ptr< catalogue::Object obj3 
)
pure virtual

estimate the distance between three objects and update the triplet vectors accordingly

Parameters
obj1pointer to an object of class Object
obj2pointer to an object of class Object
obj3pointer to an object of class Object

Implemented in cbl::triplets::Triplet2D, cbl::triplets::Triplet1D_comoving_costheta, cbl::triplets::Triplet1D_comoving_side, cbl::triplets::Triplet1D_multipoles_direct, and cbl::triplets::Triplet1D_comoving_theta.

◆ r12()

virtual double cbl::triplets::Triplet::r12 ( ) const
inlinevirtual

get the private member m_r12

Returns
the size of r12, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet1D.

Definition at line 285 of file Triplet.h.

◆ r12_binSize()

virtual double cbl::triplets::Triplet::r12_binSize ( ) const
inlinevirtual

get the private member m_r12

Returns
the size of the r12 bin, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet1D.

Definition at line 292 of file Triplet.h.

◆ r12_binSize_D1()

virtual double cbl::triplets::Triplet::r12_binSize_D1 ( ) const
inlinevirtual

get the protected member Triplet1D::m_r12_binSize_D1

Returns
the size of r12 bin in the first dimension, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 336 of file Triplet.h.

◆ r12_binSize_D2()

virtual double cbl::triplets::Triplet::r12_binSize_D2 ( ) const
inlinevirtual

get the protected member Triplet1D::m_r12_binSize_D1

Returns
the size of r12 bin in the second dimension, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 384 of file Triplet.h.

◆ r12_D1()

virtual double cbl::triplets::Triplet::r12_D1 ( ) const
inlinevirtual

get the protected member Triplet1D::m_r12_D1

Returns
the size of r12 in the first dimension, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 328 of file Triplet.h.

◆ r12_D2()

virtual double cbl::triplets::Triplet::r12_D2 ( ) const
inlinevirtual

get the protected member Triplet1D::m_r12_D1

Returns
the size of r12 in the second dimension, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 376 of file Triplet.h.

◆ r13()

virtual double cbl::triplets::Triplet::r13 ( ) const
inlinevirtual

get the private member m_side_u

Returns
the size of r13, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet1D.

Definition at line 299 of file Triplet.h.

◆ r13_binSize()

virtual double cbl::triplets::Triplet::r13_binSize ( ) const
inlinevirtual

get the private member m_side_u

Returns
the size of r13 bin, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet1D.

Definition at line 306 of file Triplet.h.

◆ r13_binSize_D1()

virtual double cbl::triplets::Triplet::r13_binSize_D1 ( ) const
inlinevirtual

get the protected member Triplet1D::m_r13_binSize_D1

Returns
the size of r13 bin in the first dimension, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 352 of file Triplet.h.

◆ r13_binSize_D2()

virtual double cbl::triplets::Triplet::r13_binSize_D2 ( ) const
inlinevirtual

get the protected member Triplet1D::m_r13_binSize_D2

Returns
the size of r13 bin in the second dimension, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 400 of file Triplet.h.

◆ r13_D1()

virtual double cbl::triplets::Triplet::r13_D1 ( ) const
inlinevirtual

get the protected member Triplet1D::m_r13_D1

Returns
the size of r13 in the first dimension, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 344 of file Triplet.h.

◆ r13_D2()

virtual double cbl::triplets::Triplet::r13_D2 ( ) const
inlinevirtual

get the protected member Triplet1D::m_r13_D2

Returns
the size of r13 in the second dimension, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 392 of file Triplet.h.

◆ scale() [1/2]

virtual std::vector<double> cbl::triplets::Triplet::scale ( ) const
inlinevirtual

get the protected member m_scale

Returns
the vector containing the binned scales

Reimplemented in cbl::triplets::Triplet1D.

Definition at line 221 of file Triplet.h.

◆ scale() [2/2]

virtual double cbl::triplets::Triplet::scale ( const int  i) const
inlinevirtual

get the protected member m_scale[i]

Parameters
ithe bin index
Returns
the i-th binned scale

Reimplemented in cbl::triplets::Triplet1D.

Definition at line 214 of file Triplet.h.

◆ scale_D1() [1/2]

virtual std::vector<double> cbl::triplets::Triplet::scale_D1 ( ) const
inlinevirtual

get the protected member m_scale_D1

Returns
the vector containing the binned scales

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 251 of file Triplet.h.

◆ scale_D1() [2/2]

virtual double cbl::triplets::Triplet::scale_D1 ( const int  i) const
inlinevirtual

get the protected member m_scale_D1[i]

Parameters
ithe bin index in the first dimension
Returns
the i-th binned scale

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 245 of file Triplet.h.

◆ scale_D2() [1/2]

virtual std::vector<double> cbl::triplets::Triplet::scale_D2 ( ) const
inlinevirtual

get the protected member m_scale_D2

Returns
the vector containing the binned scales

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 264 of file Triplet.h.

◆ scale_D2() [2/2]

virtual double cbl::triplets::Triplet::scale_D2 ( const int  i) const
inlinevirtual

get the protected member m_scale_D2[i]

Parameters
ithe bin index in the first dimension
Returns
the i-th binned scale

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 258 of file Triplet.h.

◆ set_triplet()

virtual void cbl::triplets::Triplet::set_triplet ( const int  klin,
const double  ww = 1. 
)
pure virtual

◆ set_TT1D()

virtual void cbl::triplets::Triplet::set_TT1D ( const int  i,
const double  tt 
)
inlinevirtual

set the member m_TT1D[i]

Parameters
ithe bin index
ttthe number of triplets in the bin

Reimplemented in cbl::triplets::Triplet1D.

Definition at line 431 of file Triplet.h.

◆ Sum()

virtual void cbl::triplets::Triplet::Sum ( const std::shared_ptr< Triplet tt,
const double  ww = 1. 
)
pure virtual

sum the number of triplets

Parameters
ttpointer to an object of class Triplet
wwthe weight

Implemented in cbl::triplets::Triplet2D, and cbl::triplets::Triplet1D.

◆ tripletDim()

Dim cbl::triplets::Triplet::tripletDim ( ) const
inline

get the dimension of the triplet vectors

Returns
the dimension of the triplet vectors

Definition at line 199 of file Triplet.h.

◆ tripletType()

TripletType cbl::triplets::Triplet::tripletType ( ) const
inline

get the triplet type

Returns
the triplet type

Definition at line 206 of file Triplet.h.

◆ TT1D() [1/2]

virtual std::vector<double> cbl::triplets::Triplet::TT1D ( ) const
inlinevirtual

get the private member m_TT1D

Returns
the vector containing the number of triplets in linear bins, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet1D.

Definition at line 238 of file Triplet.h.

◆ TT1D() [2/2]

virtual double cbl::triplets::Triplet::TT1D ( const int  i) const
inlinevirtual

get the private member m_TT1D[i]

Parameters
ithe bin index
Returns
the number of triplets in the i-th angular bin, or an error message if the derived object does not have this member

Reimplemented in cbl::triplets::Triplet1D.

Definition at line 230 of file Triplet.h.

◆ TT2D() [1/2]

virtual std::vector<std::vector<double> > cbl::triplets::Triplet::TT2D ( ) const
inlinevirtual

get the protected member m_TT2D

Returns
the vector containing the binned number of pairs

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 278 of file Triplet.h.

◆ TT2D() [2/2]

virtual double cbl::triplets::Triplet::TT2D ( const int  i,
const int  j 
) const
inlinevirtual

get the protected member m_TT2D[i]

Parameters
ithe bin index in the first dimension
jthe bin index in the second dimension
Returns
the number of pairs in the i-th bin

Reimplemented in cbl::triplets::Triplet2D.

Definition at line 272 of file Triplet.h.


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