From 0f38adcaa579a44dcf2319e22aa3dd6ff86c5b7f Mon Sep 17 00:00:00 2001 From: David Loiseaux Date: Tue, 26 Nov 2024 12:39:43 +0100 Subject: [PATCH] comply with windows compiler --- multipers/gudhi/Simplex_tree_multi_interface.h | 6 ++++-- multipers/gudhi/gudhi/Multi_critical_filtration.h | 5 +++-- multipers/gudhi/gudhi/Multi_persistence/Box.h | 5 +++-- multipers/gudhi/gudhi/Multi_persistence/Line.h | 5 +++-- multipers/gudhi/gudhi/One_critical_filtration.h | 5 +++-- multipers/gudhi/gudhi/Simplex_tree_multi.h | 5 +++-- multipers/gudhi/mma_interface_coh.h | 6 ++++-- multipers/gudhi/mma_interface_h0.h | 7 +++++-- multipers/gudhi/mma_interface_matrix.h | 6 ++++-- multipers/gudhi/truc.h | 6 ++++-- multipers/multi_parameter_rank_invariant/diff_helpers.h | 6 ++++-- multipers/multi_parameter_rank_invariant/function_rips.h | 6 ++++-- .../multi_parameter_rank_invariant/hilbert_function.h | 6 ++++-- .../multi_parameter_rank_invariant/persistence_slices.h | 5 +++-- multipers/multi_parameter_rank_invariant/rank_invariant.h | 6 ++++-- .../multiparameter_module_approximation/approximation.h | 6 ++++-- setup.py | 4 ++-- 17 files changed, 61 insertions(+), 34 deletions(-) diff --git a/multipers/gudhi/Simplex_tree_multi_interface.h b/multipers/gudhi/Simplex_tree_multi_interface.h index e808b35..b383d7b 100644 --- a/multipers/gudhi/Simplex_tree_multi_interface.h +++ b/multipers/gudhi/Simplex_tree_multi_interface.h @@ -24,7 +24,9 @@ #include // std::pair #include -namespace Gudhi::multiparameter::python_interface { +namespace Gudhi { +namespace multiparameter { +namespace python_interface { using interface_std = Simplex_tree; // Interface not necessary @@ -555,4 +557,4 @@ using Simplex_tree_multi_skeleton_iterator = typename template using Simplex_tree_multi_boundary_iterator = typename Simplex_tree_multi_interface::Boundary_simplex_iterator; -} // namespace Gudhi::multiparameter::python_interface +}}} // namespace Gudhi::multiparameter::python_interface diff --git a/multipers/gudhi/gudhi/Multi_critical_filtration.h b/multipers/gudhi/gudhi/Multi_critical_filtration.h index e9c220a..a635b65 100644 --- a/multipers/gudhi/gudhi/Multi_critical_filtration.h +++ b/multipers/gudhi/gudhi/Multi_critical_filtration.h @@ -31,7 +31,8 @@ #include #include -namespace Gudhi::multi_filtration { +namespace Gudhi { +namespace multi_filtration { /** * @class Multi_critical_filtration multi_critical_filtration.h gudhi/multi_critical_filtration.h @@ -996,7 +997,7 @@ class Multi_critical_filtration { } }; -} // namespace Gudhi::multi_filtration +}} // namespace Gudhi::multi_filtration namespace std { diff --git a/multipers/gudhi/gudhi/Multi_persistence/Box.h b/multipers/gudhi/gudhi/Multi_persistence/Box.h index 6f81285..a670ab0 100644 --- a/multipers/gudhi/gudhi/Multi_persistence/Box.h +++ b/multipers/gudhi/gudhi/Multi_persistence/Box.h @@ -23,7 +23,8 @@ #include #include -namespace Gudhi::multi_persistence { +namespace Gudhi{ +namespace multi_persistence { /** * @class Box Box.h gudhi/Multi_persistence/Box.h @@ -165,6 +166,6 @@ class Box { Point upperCorner_; /**< Greatest of defining corners. */ }; -} // namespace Gudhi::multi_persistence +}} // namespace Gudhi::multi_persistence #endif // BOX_H_INCLUDED diff --git a/multipers/gudhi/gudhi/Multi_persistence/Line.h b/multipers/gudhi/gudhi/Multi_persistence/Line.h index 378e968..cb65ee5 100644 --- a/multipers/gudhi/gudhi/Multi_persistence/Line.h +++ b/multipers/gudhi/gudhi/Multi_persistence/Line.h @@ -28,7 +28,8 @@ #include #include -namespace Gudhi::multi_persistence { +namespace Gudhi{ +namespace multi_persistence { /** * @class Line Line.h gudhi/Multi_persistence/Line.h @@ -276,6 +277,6 @@ class Line { } }; -} // namespace Gudhi::multi_persistence +}} // namespace Gudhi::multi_persistence #endif // LINE_FILTRATION_TRANSLATION_H_INCLUDED diff --git a/multipers/gudhi/gudhi/One_critical_filtration.h b/multipers/gudhi/gudhi/One_critical_filtration.h index 8686bb4..d9a72d2 100644 --- a/multipers/gudhi/gudhi/One_critical_filtration.h +++ b/multipers/gudhi/gudhi/One_critical_filtration.h @@ -29,7 +29,8 @@ #include -namespace Gudhi::multi_filtration { +namespace Gudhi { +namespace multi_filtration { /** * @class One_critical_filtration one_critical_filtration.h gudhi/one_critical_filtration.h @@ -1391,7 +1392,7 @@ class One_critical_filtration : public std::vector { } }; -} // namespace Gudhi::multi_filtration +}} // namespace Gudhi::multi_filtration namespace std { diff --git a/multipers/gudhi/gudhi/Simplex_tree_multi.h b/multipers/gudhi/gudhi/Simplex_tree_multi.h index 67f82df..80ce9b7 100644 --- a/multipers/gudhi/gudhi/Simplex_tree_multi.h +++ b/multipers/gudhi/gudhi/Simplex_tree_multi.h @@ -14,7 +14,8 @@ #include #include -namespace Gudhi::multi_persistence { +namespace Gudhi { +namespace multi_persistence { /** Model of SimplexTreeOptions, with a multiparameter filtration. * \ingroup multi_persistence @@ -157,6 +158,6 @@ void linear_projection(simplextree_std &st, simplextree_multi &st_multi, } } -} // namespace Gudhi::multi_persistence +}} // namespace Gudhi::multi_persistence #endif // SIMPLEX_TREE_MULTI_H_ diff --git a/multipers/gudhi/mma_interface_coh.h b/multipers/gudhi/mma_interface_coh.h index 3ad7f35..eb845a1 100644 --- a/multipers/gudhi/mma_interface_coh.h +++ b/multipers/gudhi/mma_interface_coh.h @@ -28,7 +28,9 @@ #include #include -namespace Gudhi::multiparameter::interface { +namespace Gudhi { +namespace multiparameter { +namespace interface { template class Boundary_matrix_as_filtered_complex_for_coh { @@ -248,6 +250,6 @@ class Persistence_backend_cohomology { MatrixComplex matrix_; }; -} // namespace Gudhi::multiparameter::interface +}}} // namespace Gudhi::multiparameter::interface #endif // MMA_INTERFACE_COH_H diff --git a/multipers/gudhi/mma_interface_h0.h b/multipers/gudhi/mma_interface_h0.h index 7db14ef..b0227bd 100644 --- a/multipers/gudhi/mma_interface_h0.h +++ b/multipers/gudhi/mma_interface_h0.h @@ -27,7 +27,10 @@ #include -namespace Gudhi::multiparameter::interface { +namespace Gudhi { +namespace multiparameter { +namespace interface { + template class Persistence_backend_h0 { public: using pos_index = int; @@ -224,5 +227,5 @@ template class Persistence_backend_h0 { std::vector *permutation_; std::vector permutationInv_; }; -} // namespace Gudhi::multiparameter::interface +}}} // namespace Gudhi::multiparameter::interface #endif // MMA_INTERFACE_H0_H diff --git a/multipers/gudhi/mma_interface_matrix.h b/multipers/gudhi/mma_interface_matrix.h index 575f36d..99125d8 100644 --- a/multipers/gudhi/mma_interface_matrix.h +++ b/multipers/gudhi/mma_interface_matrix.h @@ -27,7 +27,9 @@ #include #include -namespace Gudhi::multiparameter::interface { +namespace Gudhi { +namespace multiparameter { +namespace interface { template struct Multi_persistence_options : Gudhi::persistence_matrix::Default_options { @@ -276,5 +278,5 @@ class Persistence_backend_matrix { std::vector *permutation_; }; -} // namespace Gudhi::multiparameter::interface +}}} // namespace Gudhi::multiparameter::interface #endif // MMA_INTERFACE_MATRIX_H diff --git a/multipers/gudhi/truc.h b/multipers/gudhi/truc.h index 3cd8746..57edfea 100644 --- a/multipers/gudhi/truc.h +++ b/multipers/gudhi/truc.h @@ -22,7 +22,9 @@ #include //std::invoke_result #include "scc_io.h" -namespace Gudhi::multiparameter::interface { +namespace Gudhi { +namespace multiparameter { +namespace interface { using index_type = std::uint32_t; class PresentationStructure { @@ -878,4 +880,4 @@ class Truc { }; // class Truc -} // namespace Gudhi::multiparameter::interface +}}} // namespace Gudhi::multiparameter::interface diff --git a/multipers/multi_parameter_rank_invariant/diff_helpers.h b/multipers/multi_parameter_rank_invariant/diff_helpers.h index 0d3a39b..36600db 100644 --- a/multipers/multi_parameter_rank_invariant/diff_helpers.h +++ b/multipers/multi_parameter_rank_invariant/diff_helpers.h @@ -3,7 +3,9 @@ #include "Simplex_tree_multi_interface.h" #include -namespace Gudhi::multiparameter::differentiation { +namespace Gudhi { +namespace multiparameter { +namespace differentiation { using signed_measure_indices = std::vector>; template @@ -88,4 +90,4 @@ get_signed_measure_indices( return {out_indices, out_unmapped_values}; // TODO return a ptr for python } -} // namespace Gudhi::multiparameter::differentiation +}}} // namespace Gudhi::multiparameter::differentiation diff --git a/multipers/multi_parameter_rank_invariant/function_rips.h b/multipers/multi_parameter_rank_invariant/function_rips.h index 47c4bfa..09a912d 100644 --- a/multipers/multi_parameter_rank_invariant/function_rips.h +++ b/multipers/multi_parameter_rank_invariant/function_rips.h @@ -8,7 +8,9 @@ #include #include -namespace Gudhi::multiparameter::function_rips { +namespace Gudhi { +namespace multiparameter { +namespace function_rips { using value_type = typename python_interface::interface_std::Filtration_value; using _multifiltration = typename Gudhi::multi_filtration::One_critical_filtration; @@ -317,4 +319,4 @@ compute_function_rips_signed_measure_python( return container.sparsify(); } -} // namespace Gudhi::multiparameter::function_rips +}}} // namespace Gudhi::multiparameter::function_rips diff --git a/multipers/multi_parameter_rank_invariant/hilbert_function.h b/multipers/multi_parameter_rank_invariant/hilbert_function.h index 5b805f5..8953575 100644 --- a/multipers/multi_parameter_rank_invariant/hilbert_function.h +++ b/multipers/multi_parameter_rank_invariant/hilbert_function.h @@ -14,7 +14,9 @@ #include // std::pair #include -namespace Gudhi::multiparameter::hilbert_function { +namespace Gudhi { +namespace multiparameter { +namespace hilbert_function { // TODO : this function is ugly template @@ -758,4 +760,4 @@ std::pair>, std::vector> get_hilber } return raw_signed_measure; } -} // namespace Gudhi::multiparameter::hilbert_function +}}} // namespace Gudhi::multiparameter::hilbert_function diff --git a/multipers/multi_parameter_rank_invariant/persistence_slices.h b/multipers/multi_parameter_rank_invariant/persistence_slices.h index 4fc38b1..2b9974e 100644 --- a/multipers/multi_parameter_rank_invariant/persistence_slices.h +++ b/multipers/multi_parameter_rank_invariant/persistence_slices.h @@ -5,7 +5,8 @@ #include #include -namespace Gudhi::multiparameter { +namespace Gudhi { +namespace multiparameter { struct Simplex_tree_float { // smaller simplextrees typedef linear_indexing_tag Indexing_tag; @@ -144,4 +145,4 @@ inline simplextree_like collapse_edges(simplextree_like &st, int num_collapses) return collapsed_stree; } -} // namespace Gudhi::multiparameter +}} // namespace Gudhi::multiparameter diff --git a/multipers/multi_parameter_rank_invariant/rank_invariant.h b/multipers/multi_parameter_rank_invariant/rank_invariant.h index a001a6c..bf3db4f 100644 --- a/multipers/multi_parameter_rank_invariant/rank_invariant.h +++ b/multipers/multi_parameter_rank_invariant/rank_invariant.h @@ -12,7 +12,9 @@ #include // std::pair #include -namespace Gudhi::multiparameter::rank_invariant { +namespace Gudhi { +namespace multiparameter { +namespace rank_invariant { using Index = interface::index_type; // using Elbow = std::vector>;grid @@ -357,4 +359,4 @@ std::pair>, std::vector> compute_ra return raw_signed_measure; } -} // namespace Gudhi::multiparameter::rank_invariant +}}} // namespace Gudhi::multiparameter::rank_invariant diff --git a/multipers/multiparameter_module_approximation/approximation.h b/multipers/multiparameter_module_approximation/approximation.h index 0b13ee4..0fa2dbc 100644 --- a/multipers/multiparameter_module_approximation/approximation.h +++ b/multipers/multiparameter_module_approximation/approximation.h @@ -42,7 +42,9 @@ #include #include -namespace Gudhi::multiparameter::mma { +namespace Gudhi { +namespace multiparameter { +namespace mma { using Debug::Timer; using Gudhi::multi_persistence::Box; @@ -2288,6 +2290,6 @@ inline void Summand::_clean(std::vector &list, bool list.end()); } -} // namespace Gudhi::multiparameter::mma +}}} // namespace Gudhi::multiparameter::mma #endif // APPR diff --git a/setup.py b/setup.py index e1f9d0b..19bdd04 100644 --- a/setup.py +++ b/setup.py @@ -18,8 +18,8 @@ Options.fast_fail = True # Options.warning_errors = True -os.system("mkdir ./build/") -os.system("mkdir ./build/tmp") +os.system("mkdir build/") +os.system("mkdir build/tmp") def was_modified(file):