83 std::vector<std::vector<double> >
m_Lim;
138 ChainMesh (
const double cell_size,
const long nDim);
150 void set_par (
const double cell_size,
const long nDim);
175 long pos_to_index (
const std::vector<double> center)
const;
190 void index_to_inds (
const long index,
const std::vector<long> nn, std::vector<long> &indx)
const;
200 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);
230 std::vector<long>
close_objects (std::vector<double> center,
long ii=-1)
const;
243 void normalize (std::vector<std::vector<double>> points, std::vector<double> values,
const double rMAX);
257 double interpolate (std::vector<double> xi,
const int distNum);
276 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);
286 std::vector<long>
get_list (
const long cell_index)
const;
322 void set_par (
const double cell_size,
const std::vector<double> xx,
const double rMAX,
const double rMIN=-1.,
const long nMAX=300,
const long nMIN=0);
333 ChainMesh1D (
const double cell_size,
const std::vector<double> xx,
const double rMAX,
const double rMIN=-1.,
const long nMAX=300,
const long nMIN=0);
368 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);
380 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);
419 void set_par (
const double cell_size,
const std::vector<double> xx,
const std::vector<double> yy,
const std::vector<double> zz,
const double rMAX,
const double rMIN=-1.,
const long nMAX=300,
const long nMIN=0);
434 ChainMesh3D (
const double cell_size,
const std::vector<double> xx,
const std::vector<double> yy,
const std::vector<double> zz,
const double rMAX,
const double rMIN=-1.,
const long nMAX=300,
const long nMIN=0);
Useful generic functions.
ChainMesh1D()=default
default constructor
void set_par(const double cell_size, const std::vector< double > xx, const double rMAX, const double rMIN=-1., const long nMAX=300, const long nMIN=0)
function that set parameters for the chain-mesh
~ChainMesh1D()=default
default destructor
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
ChainMesh3D()=default
default constructor
~ChainMesh3D()=default
default destructor
void set_par(const double cell_size, const std::vector< double > xx, const std::vector< double > yy, const std::vector< double > zz, const double rMAX, const double rMIN=-1., const long nMAX=300, const long nMIN=0)
function that set parameters for the chain-mesh
std::vector< double > m_values
the vector containing the values of the n-dim function on the sample points
std::vector< long > close_objects(std::vector< double > center, long ii=-1) const
get the indeces of the objects close to an object
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
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
double interpolate(std::vector< double > xi, const int distNum)
N-dim interpolation of a set of N coordinates on a normalised grid (see normalize)
std::vector< long > m_multCell
multiplicative factor to compute the projected number of cells
std::vector< std::vector< long > > m_List_index
index list of internal use
std::vector< double > m_Delta
Max-Min of variable(s) used for the chain-mesh.
double m_cell_size
the size of the cell in unit of the interested quantity
int m_nDim
the number of dimension
std::vector< double > m_delta
vetors of differences between the extremals of the sample points coordinates
long nCell() const
get the private member ChainMesh::m_nCell_tot
std::vector< std::vector< double > > m_Lim
Min,Max limits of variable(s) used for the chain-mesh.
std::vector< long > m_Label
array containing the last particle of the chain-mesh in each cell
void set_par(const double cell_size, const long nDim)
function that set parameters for the chain-mesh
void create_chain_mesh_m2(const std::vector< std::vector< double > > data)
create the chain mesh
ChainMesh()=default
default constructor
std::vector< std::vector< double > > m_points
the vector containing the sample points for the n-dim interpolation
std::vector< long > m_cell_to_index
indexes in the i-th cell
std::vector< long > m_List
list of internal use
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
double m_rMAX
the maximum radius for the search of close points in the chain mesh
std::vector< long > NonEmpty_Cells() const
get the private member ChainMesh::m_NonEmpty_Cells
long pos_to_index(const std::vector< double > center) const
get the index of the cell given the object coordinates
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 interpol...
std::vector< std::vector< double > > m_extremals
the vector containing the extremals of the sample points coordinates
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
double m_rMIN
the minimum radius for the search of close points in the chain mesh
std::vector< long > m_NonEmpty_Cells
the total number of non-empty cells
long nCell_NonEmpty() const
get the private member ChainMesh::m_nCell_NonEmpty
std::vector< long > get_list(const long cell_index) const
get the index of the object inside a cell
long m_nCell_NonEmpty
the number of non-empty cells
std::vector< long > close_objects_cell(const int cell_index, long ii=-1) const
get the indeces of the objects close to a cell
long m_nCell_tot
the total number of cells
~ChainMesh()=default
default destructor
long inds_to_index(const std::vector< long > indx) const
get the unique index of the cell given the n indices
The global namespace of the CosmoBolognaLib