36 #ifndef __CATALOGUECHAINMESH__
37 #define __CATALOGUECHAINMESH__
51 class CatalogueChainMesh :
public Catalogue {
59 std::vector<std::vector<double>> m_lim;
62 std::shared_ptr<cbl::catalogue::Catalogue> m_part_catalogue;
65 std::shared_ptr<cbl::catalogue::Catalogue> m_part_catalogue2={};
68 unsigned int m_dimension;
75 CatalogueChainMesh () =
default;
82 CatalogueChainMesh (
const CatalogueChainMesh& obj) :
Catalogue (obj) {
83 m_cellsize = obj.m_cellsize;
85 m_part_catalogue = obj.m_part_catalogue;
86 m_part_catalogue2 = obj.m_part_catalogue2;
87 m_dimension = obj.m_dimension;
95 CatalogueChainMesh (CatalogueChainMesh&& obj) :
Catalogue (obj) {
96 m_cellsize = std::move(obj.m_cellsize);
97 m_lim = std::move(obj.m_lim);
98 m_part_catalogue = std::move(obj.m_part_catalogue);
99 m_part_catalogue2 = std::move(obj.m_part_catalogue2);
100 m_dimension = std::move(obj.m_dimension);
109 CatalogueChainMesh&
operator=(
const CatalogueChainMesh& obj)
112 m_cellsize = obj.m_cellsize;
114 m_part_catalogue = obj.m_part_catalogue;
115 m_part_catalogue2 = obj.m_part_catalogue2;
116 m_dimension = obj.m_dimension;
126 CatalogueChainMesh&
operator=(CatalogueChainMesh&& obj) noexcept
128 if (
this == &obj)
return *
this;
130 m_cellsize = std::move(obj.m_cellsize);
131 m_lim = std::move(obj.m_lim);
132 m_part_catalogue = std::move(obj.m_part_catalogue);
133 m_part_catalogue2 = std::move(obj.m_part_catalogue2);
134 m_dimension = std::move(obj.m_dimension);
141 ~CatalogueChainMesh () =
default;
156 CatalogueChainMesh (std::vector<catalogue::Var> variables,
double cellsize, std::shared_ptr<cbl::catalogue::Catalogue> cat, std::shared_ptr<cbl::catalogue::Catalogue> cat2={});
170 std::vector<unsigned int> Closer_object (
const std::vector<double> pos);
179 std::vector<unsigned int> Close_objects (
const std::vector<double> pos,
const double rMax,
const double rMin=0.);
188 unsigned int Count_objects (
const std::vector<double> pos,
const double rMax,
const double rMin=0.);
195 std::vector<unsigned int> N_nearest_objects (
const std::vector<double> pos,
const unsigned int N);
202 std::vector<unsigned int> N_nearest_objects (
const unsigned int obj,
const unsigned int N);
208 std::vector<std::vector<unsigned int>> N_nearest_objects_cat (
const unsigned int N);
215 void deletePart (
const unsigned int index);
222 void deletePart (
const unsigned int i,
const unsigned int p);
230 double cellsize()
const {
return m_cellsize; }
236 std::vector<std::vector<double>> lim()
const {
return m_lim; }
242 unsigned int dimension()
const {
return m_dimension; }
Catalogue()=default
default constructor
Catalogue & operator=(const Catalogue &obj)
copy assignment for the Catalogue class
The global namespace of the CosmoBolognaLib