Skip to content

Commit 9bbf072

Browse files
committed
namespaces
1 parent 1099ebf commit 9bbf072

File tree

7 files changed

+35
-10
lines changed

7 files changed

+35
-10
lines changed

core/base/delaunayRipsPersistenceDiagram/DelaunayRipsPersistenceDiagram.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#include <DelaunayRipsPersistenceDiagram.h>
22

3+
using namespace ttk::rpd;
4+
35
ttk::DelaunayRipsPersistenceDiagram::DelaunayRipsPersistenceDiagram() {
46
// inherited from Debug: prefix will be printed at the beginning of every msg
57
this->setDebugMsgPrefix("DelaunayRipsPD");

core/base/delaunayRipsPersistenceDiagram/DelaunayRipsPersistenceDiagram.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ namespace ttk {
4040
* @param[in] points Input point cloud
4141
* @param[out] ph Persistence diagram
4242
*/
43-
int execute(const PointCloud &points, MultidimensionalDiagram &ph) const;
43+
int execute(const rpd::PointCloud &points,
44+
rpd::MultidimensionalDiagram &ph) const;
4445

4546
/**
4647
* @brief Main entry point (with generators)
@@ -50,10 +51,10 @@ namespace ttk {
5051
* @param[out] generators1 1-dimensional persistent generators
5152
* @param[out] generators2 2-dimensional persistent generators
5253
*/
53-
int execute(const PointCloud &points,
54-
MultidimensionalDiagram &ph,
55-
std::vector<Generator1> &generators1,
56-
std::vector<Generator2> &generators2) const;
54+
int execute(const rpd::PointCloud &points,
55+
rpd::MultidimensionalDiagram &ph,
56+
std::vector<rpd::Generator1> &generators1,
57+
std::vector<rpd::Generator2> &generators2) const;
5758

5859
}; // DelaunayRipsPersistenceDiagram class
5960

core/base/delaunayRipsPersistenceDiagram/geoPH3.h

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@
99
#include <CGAL/Triangulation_cell_base_with_info_3.h>
1010
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
1111

12-
using namespace ttk::rpd;
13-
1412
namespace ttk::gph {
1513

14+
using rpd::Edge;
15+
using rpd::FiltratedEdge;
16+
using rpd::FiltratedSimplex;
17+
using rpd::Generator1;
18+
using rpd::Generator2;
19+
using rpd::inf;
20+
using rpd::MultidimensionalDiagram;
21+
using rpd::UnionFind;
22+
1623
using Facet = std::array<id_t, 3>;
1724

1825
struct FiltratedFacet {
@@ -1186,7 +1193,11 @@ namespace ttk::gph {
11861193
for(unsigned i = 0; i < points.size(); ++i)
11871194
p[i] = {points[i][0], points[i][1], points[i][2]};
11881195
if(threads > 1) {
1196+
#ifdef TTK_GPH_PARALLEL
11891197
DRPersistence3_p drpd(p, threads);
1198+
#else
1199+
DRPersistence3 drpd(p);
1200+
#endif
11901201
drpd.run(diagram);
11911202
} else {
11921203
DRPersistence3 drpd(p);

core/base/delaunayRipsPersistenceDiagram/geoPHd.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,22 @@
1111

1212
namespace ttk::gph {
1313

14+
using rpd::Diagram;
15+
using rpd::inf;
16+
using rpd::MultidimensionalDiagram;
17+
using rpd::Simplex;
18+
using rpd::UnionFind;
19+
1420
constexpr static unsigned DYN_DIM = 0;
1521

1622
template <unsigned D>
1723
using DSimplex = std::
1824
conditional_t<D == DYN_DIM, std::vector<id_t>, std::array<id_t, D + 1>>;
1925

2026
template <unsigned D>
21-
using ValueArray = std::
22-
conditional_t<D == DYN_DIM, std::vector<value_t>, std::array<value_t, D>>;
27+
using ValueArray = std::conditional_t<D == DYN_DIM,
28+
std::vector<rpd::value_t>,
29+
std::array<rpd::value_t, D>>;
2330

2431
template <unsigned D>
2532
using ConnectivityHashMap

core/vtk/ttkDelaunayRipsPersistenceDiagram/ttkDelaunayRipsPersistenceDiagram.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
vtkStandardNewMacro(ttkDelaunayRipsPersistenceDiagram);
1414

15+
using namespace ttk::rpd;
16+
1517
ttkDelaunayRipsPersistenceDiagram::ttkDelaunayRipsPersistenceDiagram() {
1618
this->SetNumberOfInputPorts(1);
1719
this->SetNumberOfOutputPorts(1);

core/vtk/ttkDelaunayRipsPersistenceGenerators/ttkDelaunayRipsPersistenceGenerators.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
vtkStandardNewMacro(ttkDelaunayRipsPersistenceGenerators);
1515

16+
using namespace ttk::rpd;
17+
1618
static void MakeVtkPoints(vtkPoints *vtkPoints,
1719
const std::vector<std::vector<double>> &pointsData) {
1820

core/vtk/ttkDelaunayRipsPersistenceGenerators/ttkDelaunayRipsPersistenceGenerators.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
void GeneratorsToVTU(vtkUnstructuredGrid *vtu,
3939
vtkPoints *inputPoints,
40-
const std::vector<Generator2> &generators);
40+
const std::vector<ttk::rpd::Generator2> &generators);
4141

4242
class TTKDELAUNAYRIPSPERSISTENCEGENERATORS_EXPORT
4343
ttkDelaunayRipsPersistenceGenerators

0 commit comments

Comments
 (0)