![]() |
CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
|
The class ChainMesh2D. More...
#include "Headers/ChainMesh.h"
Public Member Functions | |
ChainMesh2D ()=default | |
default constructor 1D | |
~ChainMesh2D ()=default | |
default destructor | |
void | set_par (const double cell_size, const std::vector< double > xx, const std::vector< double > yy, const double rMAX, const double rMIN=-1., const long nMAX=300, const long nMIN=0) |
function that set parameters for the chain-mesh More... | |
ChainMesh2D (const double cell_size, const std::vector< double > xx, const std::vector< double > yy, const double rMAX, const double rMIN=-1., const long nMAX=300, const long nMIN=0) | |
constructor More... | |
![]() | |
ChainMesh ()=default | |
default constructor | |
ChainMesh (const double cell_size, const long nDim) | |
constructor More... | |
~ChainMesh ()=default | |
default destructor | |
void | set_par (const double cell_size, const long nDim) |
function that set parameters for the chain-mesh More... | |
long | nCell () const |
get the private member ChainMesh::m_nCell_tot More... | |
long | nCell_NonEmpty () const |
get the private member ChainMesh::m_nCell_NonEmpty More... | |
std::vector< long > | NonEmpty_Cells () const |
get the private member ChainMesh::m_NonEmpty_Cells More... | |
long | pos_to_index (const std::vector< double > center) const |
get the index of the cell given the object coordinates More... | |
long | inds_to_index (const std::vector< long > indx) const |
get the unique index of the cell given the n indices More... | |
void | index_to_inds (const long index, const std::vector< long > nn, std::vector< long > &indx) const |
get the n indices given the unique index More... | |
void | create_chain_mesh (const std::vector< std::vector< double > > data, const double rMax, const double rMin=-1., const long nMAX=300, const long nMIN=10) |
create the chain mesh More... | |
void | create_chain_mesh_m2 (const std::vector< std::vector< double > > data) |
create the chain mesh More... | |
void | get_searching_region (const double r_max, const double r_min=-1.) |
set the internal variable m_search_region, the list of cell around a generic center More... | |
std::vector< long > | close_objects_cell (const int cell_index, long ii=-1) const |
get the indeces of the objects close to a cell More... | |
std::vector< long > | close_objects (std::vector< double > center, long ii=-1) const |
get the indeces of the objects close to an object More... | |
void | normalize (std::vector< std::vector< double >> points, std::vector< double > values, const double rMAX) |
function to set a normalized (square/cubic) grid from a sample of points, used for the N-dim interpolation More... | |
double | interpolate (std::vector< double > xi, const int distNum) |
N-dim interpolation of a set of N coordinates on a normalised grid (see normalize) More... | |
std::vector< double > | interpolate (std::vector< std::vector< double >> points, std::vector< double > values, std::vector< std::vector< double >> xi, const int distNum, const double rMAX) |
N-dim interpolation. More... | |
std::vector< long > | get_list (const long cell_index) const |
get the index of the object inside a cell More... | |
Additional Inherited Members | |
![]() | |
int | m_nDim |
the number of dimension | |
std::vector< long > | m_cell_to_index |
indexes in the i-th cell | |
double | m_cell_size |
the size of the cell in unit of the interested quantity | |
std::vector< long > | m_List |
list of internal use | |
std::vector< long > | m_Label |
array containing the last particle of the chain-mesh in each cell | |
std::vector< std::vector< long > > | m_List_index |
index list of internal use | |
std::vector< std::vector< double > > | m_Lim |
Min,Max limits of variable(s) used for the chain-mesh. | |
std::vector< double > | m_Delta |
Max-Min of variable(s) used for the chain-mesh. | |
std::vector< long > | m_nCell |
number of cell(s) for variable(s) | |
std::vector< long > | m_search_region |
the list of cell around a generic center | |
long | m_nCell_tot |
the total number of cells | |
long | m_nCell_NonEmpty |
the number of non-empty cells | |
std::vector< long > | m_NonEmpty_Cells |
the total number of non-empty cells | |
std::vector< long > | m_multCell |
multiplicative factor to compute the projected number of cells | |
std::vector< std::vector< double > > | m_points |
the vector containing the sample points for the n-dim interpolation | |
std::vector< double > | m_values |
the vector containing the values of the n-dim function on the sample points | |
std::vector< std::vector< double > > | m_extremals |
the vector containing the extremals of the sample points coordinates | |
std::vector< double > | m_delta |
vetors of differences between the extremals of the sample points coordinates | |
double | m_rMAX |
the maximum radius for the search of close points in the chain mesh | |
double | m_rMIN |
the minimum radius for the search of close points in the chain mesh | |
The class ChainMesh2D.
This class is used to handle objects of type ChainMesh2D
Definition at line 344 of file ChainMesh.h.
cbl::chainmesh::ChainMesh2D::ChainMesh2D | ( | const double | cell_size, |
const std::vector< double > | xx, | ||
const std::vector< double > | yy, | ||
const double | rMAX, | ||
const double | rMIN = -1. , |
||
const long | nMAX = 300 , |
||
const long | nMIN = 0 |
||
) |
constructor
cell_size | double storing the cell size |
xx | the vector with the first variable used for the chain-mesh |
yy | the vector with the second variable used for the chain-mesh |
rMAX | the maximum separation |
rMIN | the minimum separation |
nMAX | the allowed maximum number of chain-mesh cells in each dimension |
nMIN | the allowed minimum number of chain-mesh cells in each dimension |
Definition at line 579 of file ChainMesh.cpp.
void cbl::chainmesh::ChainMesh2D::set_par | ( | const double | cell_size, |
const std::vector< double > | xx, | ||
const std::vector< double > | yy, | ||
const double | rMAX, | ||
const double | rMIN = -1. , |
||
const long | nMAX = 300 , |
||
const long | nMIN = 0 |
||
) |
function that set parameters for the chain-mesh
cell_size | double storing the cell size |
xx | the vector with the first variable used for the chain-mesh |
yy | the vector with the second variable used for the chain-mesh |
rMAX | the maximum separation |
rMIN | the minimum separation |
nMAX | the allowed maximum number of chain-mesh cells in each dimension |
nMIN | the allowed minimum number of chain-mesh cells in each dimension |
Definition at line 565 of file ChainMesh.cpp.