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

The class Triplet2D. More...

#include <Triplet2D.h>

Inheritance diagram for cbl::triplets::Triplet2D:
Collaboration diagram for cbl::triplets::Triplet2D:

Public Member Functions

Constructors/destructors
 Triplet2D ()
 default constructor
 
 Triplet2D (const double r12_D1, const double r12_binSize_D1, const double r13_D1, const double r13_binSize_D1, const int nbins_D1, const double r12_D2, const double r12_binSize_D2, const double r13_D2, const double r13_binSize_D2, const int nbins_D2)
 constructor More...
 
 ~Triplet2D ()=default
 default destructor
 
Member functions used to get the protected members
double scale_D1 (const int i) const override
 get the protected member m_scale_D1[i] More...
 
std::vector< double > scale_D1 () const override
 get the protected member m_scale_D1 More...
 
double scale_D2 (const int i) const override
 get the protected member m_scale_D2[i] More...
 
std::vector< double > scale_D2 () const override
 get the protected member m_scale_D2 More...
 
double TT2D (const int i, const int j) const override
 get the protected member m_PP2D[i] More...
 
std::vector< std::vector< double > > TT2D () const override
 get the protected member m_PP2D More...
 
double r12_D1 () const override
 get the protected member Triplet1D::m_r12_D1 More...
 
double r12_binSize_D1 () const override
 get the protected member Triplet1D::m_r12_binSize_D1 More...
 
double r13_D1 () const override
 get the protected member Triplet1D::m_r13_D1 More...
 
double r13_binSize_D1 () const override
 get the protected member Triplet1D::m_r13_binSize_D1 More...
 
double binSize_D1 () const override
 get the protected member m_binSize_D1 More...
 
double r12_D2 () const override
 get the protected member Triplet1D::m_r12_D2 More...
 
double r12_binSize_D2 () const override
 get the protected member Triplet1D::m_r12_binSize_D2 More...
 
double r13_D2 () const override
 get the protected member Triplet1D::m_r13_D2 More...
 
double r13_binSize_D2 () const override
 get the protected member Triplet1D::m_r13_binSize_D2 More...
 
double binSize_D2 () const override
 get the protected member m_binSize_D2 More...
 
Member functions used to handle triplets
void Sum (const std::shared_ptr< Triplet > tt, const double ww=1) override
 sum the number of triplets More...
 
virtual void get_triplet (const double r12, const double r13, const double r23, int &klin) override
 estimate the distance between two objects and update the triplet vectors accordingly More...
 
virtual void set_triplet (const int klin, const double ww=1.) override
 update the triplet More...
 
void put (const double r12, const double r13, const double r23, const double ww=1.) override
 estimate the distance between three objects and update the triplet vectors accordingly More...
 
void put (const std::shared_ptr< catalogue::Object > obj1, const std::shared_ptr< catalogue::Object > obj2, const std::shared_ptr< catalogue::Object > obj3) override
 estimate the distance between three objects and update the triplet vectors accordingly More...
 
- Public Member Functions inherited from cbl::triplets::Triplet
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 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 int nbins_D1 () const
 get the protected member Triplet1D::m_nbins_D1 More...
 
virtual int nbins_D2 () const
 get the protected member Triplet1D::m_nbins_D2 More...
 
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...
 
virtual ~Triplet ()
 default destructor
 

Protected Attributes

std::vector< double > m_scale_D1
 the binned scales in the first dimension
 
std::vector< double > m_scale_D2
 the binned scales in the second dimension
 
std::vector< std::vector< double > > m_TT2D
 the number of binned triplets
 
Binning parameters
double m_r12_D1
 the size of r12 in the first dimension
 
double m_r12_binSize_D1
 the size of r12 bin in the first dimension
 
double m_r13_D1
 the size of r13 in the first dimension
 
double m_r13_binSize_D1
 the size of r13 bin in the first dimension
 
int m_nbins_D1
 the number of bins in the first dimension
 
double m_binSize_D1
 the bin size in the first dimension
 
double m_r12_D2
 the size of r12 in the second dimension
 
double m_r12_binSize_D2
 the size of r12 bin in the second dimension
 
double m_r13_D2
 the size of r13 in the second dimension
 
double m_r13_binSize_D2
 the size of r13 bin in the second dimension
 
int m_nbins_D2
 the number of bins in the second dimension
 
double m_binSize_D2
 the bin size in the second dimension
 
- Protected Attributes inherited from cbl::triplets::Triplet
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
 

Additional Inherited Members

- Static Public Member Functions inherited from cbl::triplets::Triplet
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 Triplet2D.

"Headers/Triplet2D.h"

This class is used to handle objects of type Triplet2D , used to handle 2D triplets of objects

Warning
This class has not been fully implemented yet

Definition at line 64 of file Triplet2D.h.

Constructor & Destructor Documentation

◆ Triplet2D()

cbl::triplets::Triplet2D::Triplet2D ( const double  r12_D1,
const double  r12_binSize_D1,
const double  r13_D1,
const double  r13_binSize_D1,
const int  nbins_D1,
const double  r12_D2,
const double  r12_binSize_D2,
const double  r13_D2,
const double  r13_binSize_D2,
const int  nbins_D2 
)
inline

constructor

Parameters
r12_D1the size of r12 in the first dimension
r12_binSize_D1the size of r12 bin in the first dimension
r13_D1the size of r13 in the first dimension
r13_binSize_D1the size of r13 bin in the first dimension
nbins_D1the number of bins in the first dimension
r12_D2the size of r12 in the second dimension
r12_binSize_D2the size of r12 bin in the second dimension
r13_D2the size of r13 in the second dimension
r13_binSize_D2the size of r13 bin in the second dimension
nbins_D2the number of bins in the second dimension

Definition at line 173 of file Triplet2D.h.

Member Function Documentation

◆ binSize_D1()

double cbl::triplets::Triplet2D::binSize_D1 ( ) const
inlineoverridevirtual

get the protected member m_binSize_D1

Returns
the bin size in the first dimension

Reimplemented from cbl::triplets::Triplet.

Definition at line 259 of file Triplet2D.h.

◆ binSize_D2()

double cbl::triplets::Triplet2D::binSize_D2 ( ) const
inlineoverridevirtual

get the protected member m_binSize_D2

Returns
the bin size in the second dimension

Reimplemented from cbl::triplets::Triplet.

Definition at line 289 of file Triplet2D.h.

◆ get_triplet()

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

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

Implements cbl::triplets::Triplet.

Definition at line 318 of file Triplet2D.h.

◆ put() [1/2]

void cbl::triplets::Triplet2D::put ( const double  r12,
const double  r13,
const double  r23,
const double  ww = 1. 
)
inlineoverridevirtual

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

Parameters
r12distance between object1 and object2
r13distance between object1 and object3
r23distance between object2 and object3
wwtotal weight
Warning
this method has not been implemented yet

Implements cbl::triplets::Triplet.

Definition at line 339 of file Triplet2D.h.

◆ put() [2/2]

void cbl::triplets::Triplet2D::put ( const std::shared_ptr< catalogue::Object obj1,
const std::shared_ptr< catalogue::Object obj2,
const std::shared_ptr< catalogue::Object obj3 
)
inlineoverridevirtual

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
Warning
This method has not been implemented yet

Implements cbl::triplets::Triplet.

Definition at line 351 of file Triplet2D.h.

◆ r12_binSize_D1()

double cbl::triplets::Triplet2D::r12_binSize_D1 ( ) const
inlineoverridevirtual

get the protected member Triplet1D::m_r12_binSize_D1

Returns
the size of r12 bin in the first dimension

Reimplemented from cbl::triplets::Triplet.

Definition at line 241 of file Triplet2D.h.

◆ r12_binSize_D2()

double cbl::triplets::Triplet2D::r12_binSize_D2 ( ) const
inlineoverridevirtual

get the protected member Triplet1D::m_r12_binSize_D2

Returns
the size of r12 bin in the second dimension

Reimplemented from cbl::triplets::Triplet.

Definition at line 271 of file Triplet2D.h.

◆ r12_D1()

double cbl::triplets::Triplet2D::r12_D1 ( ) const
inlineoverridevirtual

get the protected member Triplet1D::m_r12_D1

Returns
the size of r12 in the first dimension

Reimplemented from cbl::triplets::Triplet.

Definition at line 235 of file Triplet2D.h.

◆ r12_D2()

double cbl::triplets::Triplet2D::r12_D2 ( ) const
inlineoverridevirtual

get the protected member Triplet1D::m_r12_D2

Returns
the size of r12 in the second dimension

Reimplemented from cbl::triplets::Triplet.

Definition at line 265 of file Triplet2D.h.

◆ r13_binSize_D1()

double cbl::triplets::Triplet2D::r13_binSize_D1 ( ) const
inlineoverridevirtual

get the protected member Triplet1D::m_r13_binSize_D1

Returns
the size of r13 bin in the first dimension

Reimplemented from cbl::triplets::Triplet.

Definition at line 253 of file Triplet2D.h.

◆ r13_binSize_D2()

double cbl::triplets::Triplet2D::r13_binSize_D2 ( ) const
inlineoverridevirtual

get the protected member Triplet1D::m_r13_binSize_D2

Returns
the size of r13 bin in the second dimension

Reimplemented from cbl::triplets::Triplet.

Definition at line 283 of file Triplet2D.h.

◆ r13_D1()

double cbl::triplets::Triplet2D::r13_D1 ( ) const
inlineoverridevirtual

get the protected member Triplet1D::m_r13_D1

Returns
the size of r13 in the first dimension

Reimplemented from cbl::triplets::Triplet.

Definition at line 247 of file Triplet2D.h.

◆ r13_D2()

double cbl::triplets::Triplet2D::r13_D2 ( ) const
inlineoverridevirtual

get the protected member Triplet1D::m_r13_D2

Returns
the size of r13 in the second dimension

Reimplemented from cbl::triplets::Triplet.

Definition at line 277 of file Triplet2D.h.

◆ scale_D1() [1/2]

std::vector<double> cbl::triplets::Triplet2D::scale_D1 ( ) const
inlineoverridevirtual

get the protected member m_scale_D1

Returns
the vector containing the binned scales

Reimplemented from cbl::triplets::Triplet.

Definition at line 202 of file Triplet2D.h.

◆ scale_D1() [2/2]

double cbl::triplets::Triplet2D::scale_D1 ( const int  i) const
inlineoverridevirtual

get the protected member m_scale_D1[i]

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

Reimplemented from cbl::triplets::Triplet.

Definition at line 196 of file Triplet2D.h.

◆ scale_D2() [1/2]

std::vector<double> cbl::triplets::Triplet2D::scale_D2 ( ) const
inlineoverridevirtual

get the protected member m_scale_D2

Returns
the vector containing the binned scales

Reimplemented from cbl::triplets::Triplet.

Definition at line 215 of file Triplet2D.h.

◆ scale_D2() [2/2]

double cbl::triplets::Triplet2D::scale_D2 ( const int  i) const
inlineoverridevirtual

get the protected member m_scale_D2[i]

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

Reimplemented from cbl::triplets::Triplet.

Definition at line 209 of file Triplet2D.h.

◆ set_triplet()

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

update the triplet

Parameters
klintriplet bin
wwthe weight

Implements cbl::triplets::Triplet.

Definition at line 326 of file Triplet2D.h.

◆ Sum()

void cbl::triplets::Triplet2D::Sum ( const std::shared_ptr< Triplet tt,
const double  ww = 1 
)
inlineoverridevirtual

sum the number of triplets

Parameters
ttpointer to an object of class Triplet
wwthe weight
Warning
This method has not been implemented yet

Implements cbl::triplets::Triplet.

Definition at line 307 of file Triplet2D.h.

◆ TT2D() [1/2]

std::vector<std::vector<double> > cbl::triplets::Triplet2D::TT2D ( ) const
inlineoverridevirtual

get the protected member m_PP2D

Returns
the vector containing the binned number of pairs

Reimplemented from cbl::triplets::Triplet.

Definition at line 229 of file Triplet2D.h.

◆ TT2D() [2/2]

double cbl::triplets::Triplet2D::TT2D ( const int  i,
const int  j 
) const
inlineoverridevirtual

get the protected member m_PP2D[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 from cbl::triplets::Triplet.

Definition at line 223 of file Triplet2D.h.


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