From f39eadf13a039b24b175abd8290681829e44763e Mon Sep 17 00:00:00 2001 From: David Loiseaux Date: Tue, 26 Nov 2024 14:47:18 +0100 Subject: [PATCH] fix: comply with windows --- .../gudhi/Persistence_slices_interface.h | 38 +++++++++---------- multipers/gudhi/mma_interface_coh.h | 2 +- multipers/gudhi/mma_interface_h0.h | 2 +- multipers/gudhi/mma_interface_matrix.h | 2 +- multipers/gudhi/truc.h | 2 +- .../hilbert_function.h | 14 +++---- .../rank_invariant.h | 14 +++---- 7 files changed, 37 insertions(+), 37 deletions(-) diff --git a/multipers/gudhi/Persistence_slices_interface.h b/multipers/gudhi/Persistence_slices_interface.h index fc74413..8c00055 100644 --- a/multipers/gudhi/Persistence_slices_interface.h +++ b/multipers/gudhi/Persistence_slices_interface.h @@ -17,57 +17,57 @@ enum Column_types_strs { LIST, SET, HEAP, VECTOR, NAIVE_VECTOR, UNORDERED_SET, I using Available_columns = Gudhi::persistence_matrix::Column_types; template -using BackendOptionsWithVine = Gudhi::multiparameter::interface::Multi_persistence_options; +using BackendOptionsWithVine = Gudhi::multiparameter::truc_interface::Multi_persistence_options; template -using BackendOptionsWithoutVine = Gudhi::multiparameter::interface::No_vine_multi_persistence_options; +using BackendOptionsWithoutVine = Gudhi::multiparameter::truc_interface::No_vine_multi_persistence_options; template -using ClementBackendOptionsWithVine = Gudhi::multiparameter::interface::Multi_persistence_Clement_options; +using ClementBackendOptionsWithVine = Gudhi::multiparameter::truc_interface::Multi_persistence_Clement_options; -using SimplicialStructure = Gudhi::multiparameter::interface::SimplicialStructure; -using PresentationStructure = Gudhi::multiparameter::interface::PresentationStructure; +using SimplicialStructure = Gudhi::multiparameter::truc_interface::SimplicialStructure; +using PresentationStructure = Gudhi::multiparameter::truc_interface::PresentationStructure; template using MatrixBackendNoVine = - Gudhi::multiparameter::interface::Persistence_backend_matrix, Structure>; + Gudhi::multiparameter::truc_interface::Persistence_backend_matrix, Structure>; template using MatrixBackendVine = - Gudhi::multiparameter::interface::Persistence_backend_matrix, Structure>; + Gudhi::multiparameter::truc_interface::Persistence_backend_matrix, Structure>; template using ClementMatrixBackendVine = - Gudhi::multiparameter::interface::Persistence_backend_matrix, Structure>; -using GraphBackendVine = Gudhi::multiparameter::interface::Persistence_backend_h0; + Gudhi::multiparameter::truc_interface::Persistence_backend_matrix, Structure>; +using GraphBackendVine = Gudhi::multiparameter::truc_interface::Persistence_backend_h0; using Filtration_value = Gudhi::multi_filtration::One_critical_filtration; template using SimplicialNoVineMatrixTruc = - Gudhi::multiparameter::interface::Truc, SimplicialStructure, Filtration_value>; + Gudhi::multiparameter::truc_interface::Truc, SimplicialStructure, Filtration_value>; template -using GeneralVineTruc = Gudhi::multiparameter::interface:: +using GeneralVineTruc = Gudhi::multiparameter::truc_interface:: Truc, PresentationStructure, Filtration_value>; template -using GeneralNoVineTruc = Gudhi::multiparameter::interface:: +using GeneralNoVineTruc = Gudhi::multiparameter::truc_interface:: Truc, PresentationStructure, Filtration_value>; template -using GeneralVineClementTruc = Gudhi::multiparameter::interface:: +using GeneralVineClementTruc = Gudhi::multiparameter::truc_interface:: Truc, PresentationStructure, Filtration_value>; template using SimplicialVineMatrixTruc = - Gudhi::multiparameter::interface::Truc, SimplicialStructure, Filtration_value>; + Gudhi::multiparameter::truc_interface::Truc, SimplicialStructure, Filtration_value>; using SimplicialVineGraphTruc = - Gudhi::multiparameter::interface::Truc; + Gudhi::multiparameter::truc_interface::Truc; // multicrititcal using Multi_critical_filtrationValue = Gudhi::multi_filtration::Multi_critical_filtration; template -using KCriticalVineTruc = Gudhi::multiparameter::interface:: +using KCriticalVineTruc = Gudhi::multiparameter::truc_interface:: Truc, PresentationStructure, Multi_critical_filtrationValue>; template @@ -84,7 +84,7 @@ template -using MatrixTrucPythonInterface = Gudhi::multiparameter::interface:: +using MatrixTrucPythonInterface = Gudhi::multiparameter::truc_interface:: Truc, PresentationStructure, filtration_options>; enum class BackendsEnum { Matrix, Graph, Clement, GudhiCohomology }; @@ -107,7 +107,7 @@ struct PersBackendOptsImpl { template struct PersBackendOptsImpl { static_assert(!is_vine, "Gudhi is not vine"); - using type = Gudhi::multiparameter::interface::Persistence_backend_cohomology; + using type = Gudhi::multiparameter::truc_interface::Persistence_backend_cohomology; }; template @@ -128,5 +128,5 @@ template -using TrucPythonInterface = Gudhi::multiparameter::interface:: +using TrucPythonInterface = Gudhi::multiparameter::truc_interface:: Truc, StructureStuff, filtration_options>; diff --git a/multipers/gudhi/mma_interface_coh.h b/multipers/gudhi/mma_interface_coh.h index eb845a1..336ab1d 100644 --- a/multipers/gudhi/mma_interface_coh.h +++ b/multipers/gudhi/mma_interface_coh.h @@ -30,7 +30,7 @@ namespace Gudhi { namespace multiparameter { -namespace interface { +namespace truc_interface { template class Boundary_matrix_as_filtered_complex_for_coh { diff --git a/multipers/gudhi/mma_interface_h0.h b/multipers/gudhi/mma_interface_h0.h index b0227bd..a1e688d 100644 --- a/multipers/gudhi/mma_interface_h0.h +++ b/multipers/gudhi/mma_interface_h0.h @@ -29,7 +29,7 @@ namespace Gudhi { namespace multiparameter { -namespace interface { +namespace truc_interface { template class Persistence_backend_h0 { public: diff --git a/multipers/gudhi/mma_interface_matrix.h b/multipers/gudhi/mma_interface_matrix.h index 99125d8..aa46d4f 100644 --- a/multipers/gudhi/mma_interface_matrix.h +++ b/multipers/gudhi/mma_interface_matrix.h @@ -29,7 +29,7 @@ namespace Gudhi { namespace multiparameter { -namespace interface { +namespace truc_interface { template struct Multi_persistence_options : Gudhi::persistence_matrix::Default_options { diff --git a/multipers/gudhi/truc.h b/multipers/gudhi/truc.h index 57edfea..6f5fe35 100644 --- a/multipers/gudhi/truc.h +++ b/multipers/gudhi/truc.h @@ -24,7 +24,7 @@ namespace Gudhi { namespace multiparameter { -namespace interface { +namespace truc_interface { using index_type = std::uint32_t; class PresentationStructure { diff --git a/multipers/multi_parameter_rank_invariant/hilbert_function.h b/multipers/multi_parameter_rank_invariant/hilbert_function.h index 8953575..44e3dae 100644 --- a/multipers/multi_parameter_rank_invariant/hilbert_function.h +++ b/multipers/multi_parameter_rank_invariant/hilbert_function.h @@ -453,7 +453,7 @@ void get_hilbert_surface_python(python_interface::Simplex_tree_multi_interface inline void compute_2d_hilbert_surface( - tbb::enumerable_thread_specific::ThreadSafe, + tbb::enumerable_thread_specific::ThreadSafe, std::vector>> &thread_stuff, const tensor::static_tensor_view &out, // assumes its a zero tensor const std::vector grid_shape, @@ -497,7 +497,7 @@ inline void compute_2d_hilbert_surface( for (auto stuff : fixed_values) std::cout << stuff << " "; std::cout << "]" << std::endl; } - using bc_type = typename interface::Truc::split_barcode; + using bc_type = typename truc_interface::Truc::split_barcode; if constexpr (PersBackend::is_vine) { if (!slicer.has_persistence()) [[unlikely]] { slicer.compute_persistence(); @@ -568,7 +568,7 @@ inline void compute_2d_hilbert_surface( template void _rec_get_hilbert_surface( - tbb::enumerable_thread_specific::ThreadSafe, + tbb::enumerable_thread_specific::ThreadSafe, std::vector>> &thread_stuff, const tensor::static_tensor_view &out, // assumes its a zero tensor const std::vector grid_shape, @@ -617,7 +617,7 @@ void _rec_get_hilbert_surface( } template -void get_hilbert_surface(interface::Truc &slicer, +void get_hilbert_surface(truc_interface::Truc &slicer, const tensor::static_tensor_view &out, // assumes its a zero tensor const std::vector &grid_shape, const std::vector °rees, @@ -629,7 +629,7 @@ void get_hilbert_surface(interface::Truc &sl // wrapper arount the rec version, that initialize the thread variables. if (coordinates_to_compute.size() < 2) throw std::logic_error("Not implemented for " + std::to_string(coordinates_to_compute.size()) + "<2 parameters."); - using ThreadSafe = typename interface::Truc::ThreadSafe; + using ThreadSafe = typename truc_interface::Truc::ThreadSafe; ThreadSafe slicer_thread(slicer); std::vector coordinates_container(slicer_thread.num_parameters() + 1); // +1 for degree // coordinates_container.reserve(fixed_values.size()+1); @@ -649,7 +649,7 @@ template -void get_hilbert_surface_python(interface::Truc &slicer, +void get_hilbert_surface_python(truc_interface::Truc &slicer, dtype *data_ptr, std::vector grid_shape, const std::vector degrees, @@ -702,7 +702,7 @@ template std::pair>, std::vector> get_hilbert_signed_measure( - interface::Truc &slicer, + truc_interface::Truc &slicer, dtype *data_ptr, std::vector grid_shape, const std::vector degrees, diff --git a/multipers/multi_parameter_rank_invariant/rank_invariant.h b/multipers/multi_parameter_rank_invariant/rank_invariant.h index bf3db4f..f2114b6 100644 --- a/multipers/multi_parameter_rank_invariant/rank_invariant.h +++ b/multipers/multi_parameter_rank_invariant/rank_invariant.h @@ -15,7 +15,7 @@ namespace Gudhi { namespace multiparameter { namespace rank_invariant { -using Index = interface::index_type; +using Index = truc_interface::index_type; // using Elbow = std::vector>;grid template @@ -167,7 +167,7 @@ template inline void compute_2d_rank_invariant_of_elbow( - typename interface::Truc::ThreadSafe &slicer, // truc slicer + typename truc_interface::Truc::ThreadSafe &slicer, // truc slicer const tensor::static_tensor_view &out, // assumes its a zero tensor const index_type I, const index_type J, @@ -210,7 +210,7 @@ inline void compute_2d_rank_invariant_of_elbow( // TODO : use slicer::ThreadSafe instead of maintaining one_pers & order // BUG : This will break as soon as slicer interface change - using bc_type = typename interface::Truc::split_barcode; + using bc_type = typename truc_interface::Truc::split_barcode; bc_type barcodes; if constexpr (PersBackend::is_vine) { // slicer.set_one_filtration(one_persistence); @@ -275,7 +275,7 @@ template inline void compute_2d_rank_invariant( - interface::Truc &slicer, + truc_interface::Truc &slicer, const tensor::static_tensor_view &out, // assumes its a zero tensor const std::vector &grid_shape, const std::vector °rees, @@ -288,7 +288,7 @@ inline void compute_2d_rank_invariant( std::cout << "Shape " << grid_shape[0] << " " << grid_shape[1] << " " << grid_shape[2] << " " << grid_shape[3] << " " << grid_shape[4] << std::endl; - using ThreadSafe = typename interface::Truc::ThreadSafe; + using ThreadSafe = typename truc_interface::Truc::ThreadSafe; ThreadSafe slicer_thread(slicer); tbb::enumerable_thread_specific thread_locals(slicer_thread); tbb::parallel_for(0, X, [&](index_type I) { @@ -307,7 +307,7 @@ template , typename dtype, typename indices_type> -void compute_rank_invariant_python(interface::Truc slicer, +void compute_rank_invariant_python(truc_interface::Truc slicer, dtype *data_ptr, const std::vector grid_shape, const std::vector degrees, @@ -327,7 +327,7 @@ template std::pair>, std::vector> compute_rank_signed_measure( - interface::Truc slicer, + truc_interface::Truc slicer, dtype *data_ptr, const std::vector grid_shape, const std::vector degrees,