Skip to content

Commit

Permalink
fix: comply with windows
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLapous committed Nov 26, 2024
1 parent 0f38adc commit f39eadf
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 37 deletions.
38 changes: 19 additions & 19 deletions multipers/gudhi/Persistence_slices_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Available_columns col>
using BackendOptionsWithVine = Gudhi::multiparameter::interface::Multi_persistence_options<col>;
using BackendOptionsWithVine = Gudhi::multiparameter::truc_interface::Multi_persistence_options<col>;
template <Available_columns col>
using BackendOptionsWithoutVine = Gudhi::multiparameter::interface::No_vine_multi_persistence_options<col>;
using BackendOptionsWithoutVine = Gudhi::multiparameter::truc_interface::No_vine_multi_persistence_options<col>;

template <Available_columns col>
using ClementBackendOptionsWithVine = Gudhi::multiparameter::interface::Multi_persistence_Clement_options<col>;
using ClementBackendOptionsWithVine = Gudhi::multiparameter::truc_interface::Multi_persistence_Clement_options<col>;

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 <Available_columns col, class Structure = SimplicialStructure>
using MatrixBackendNoVine =
Gudhi::multiparameter::interface::Persistence_backend_matrix<BackendOptionsWithoutVine<col>, Structure>;
Gudhi::multiparameter::truc_interface::Persistence_backend_matrix<BackendOptionsWithoutVine<col>, Structure>;

template <Available_columns col, class Structure = SimplicialStructure>
using MatrixBackendVine =
Gudhi::multiparameter::interface::Persistence_backend_matrix<BackendOptionsWithVine<col>, Structure>;
Gudhi::multiparameter::truc_interface::Persistence_backend_matrix<BackendOptionsWithVine<col>, Structure>;

template <Available_columns col, class Structure = SimplicialStructure>
using ClementMatrixBackendVine =
Gudhi::multiparameter::interface::Persistence_backend_matrix<ClementBackendOptionsWithVine<col>, Structure>;
using GraphBackendVine = Gudhi::multiparameter::interface::Persistence_backend_h0<SimplicialStructure>;
Gudhi::multiparameter::truc_interface::Persistence_backend_matrix<ClementBackendOptionsWithVine<col>, Structure>;
using GraphBackendVine = Gudhi::multiparameter::truc_interface::Persistence_backend_h0<SimplicialStructure>;

using Filtration_value = Gudhi::multi_filtration::One_critical_filtration<float>;

template <Available_columns col = Available_columns::INTRUSIVE_SET>
using SimplicialNoVineMatrixTruc =
Gudhi::multiparameter::interface::Truc<MatrixBackendNoVine<col>, SimplicialStructure, Filtration_value>;
Gudhi::multiparameter::truc_interface::Truc<MatrixBackendNoVine<col>, SimplicialStructure, Filtration_value>;

template <Available_columns col = Available_columns::INTRUSIVE_SET>
using GeneralVineTruc = Gudhi::multiparameter::interface::
using GeneralVineTruc = Gudhi::multiparameter::truc_interface::
Truc<MatrixBackendVine<col, PresentationStructure>, PresentationStructure, Filtration_value>;

template <Available_columns col = Available_columns::INTRUSIVE_SET>
using GeneralNoVineTruc = Gudhi::multiparameter::interface::
using GeneralNoVineTruc = Gudhi::multiparameter::truc_interface::
Truc<MatrixBackendNoVine<col, PresentationStructure>, PresentationStructure, Filtration_value>;

template <Available_columns col = Available_columns::INTRUSIVE_SET>
using GeneralVineClementTruc = Gudhi::multiparameter::interface::
using GeneralVineClementTruc = Gudhi::multiparameter::truc_interface::
Truc<ClementMatrixBackendVine<col, PresentationStructure>, PresentationStructure, Filtration_value>;

template <Available_columns col = Available_columns::INTRUSIVE_SET>
using SimplicialVineMatrixTruc =
Gudhi::multiparameter::interface::Truc<MatrixBackendVine<col>, SimplicialStructure, Filtration_value>;
Gudhi::multiparameter::truc_interface::Truc<MatrixBackendVine<col>, SimplicialStructure, Filtration_value>;
using SimplicialVineGraphTruc =
Gudhi::multiparameter::interface::Truc<GraphBackendVine, SimplicialStructure, Filtration_value>;
Gudhi::multiparameter::truc_interface::Truc<GraphBackendVine, SimplicialStructure, Filtration_value>;

// multicrititcal
using Multi_critical_filtrationValue = Gudhi::multi_filtration::Multi_critical_filtration<float>;
template <Available_columns col = Available_columns::INTRUSIVE_SET>
using KCriticalVineTruc = Gudhi::multiparameter::interface::
using KCriticalVineTruc = Gudhi::multiparameter::truc_interface::
Truc<MatrixBackendVine<col, PresentationStructure>, PresentationStructure, Multi_critical_filtrationValue>;

template <bool is_vine, Available_columns col = Available_columns::INTRUSIVE_SET>
Expand All @@ -84,7 +84,7 @@ template <bool is_vine,
bool is_kcritical,
typename value_type,
Available_columns col = Available_columns::INTRUSIVE_SET>
using MatrixTrucPythonInterface = Gudhi::multiparameter::interface::
using MatrixTrucPythonInterface = Gudhi::multiparameter::truc_interface::
Truc<Matrix_interface<is_vine, col>, PresentationStructure, filtration_options<is_kcritical, value_type>>;

enum class BackendsEnum { Matrix, Graph, Clement, GudhiCohomology };
Expand All @@ -107,7 +107,7 @@ struct PersBackendOptsImpl<BackendsEnum::Clement, is_vine, col> {
template <bool is_vine, Available_columns col>
struct PersBackendOptsImpl<BackendsEnum::GudhiCohomology, is_vine, col> {
static_assert(!is_vine, "Gudhi is not vine");
using type = Gudhi::multiparameter::interface::Persistence_backend_cohomology<PresentationStructure>;
using type = Gudhi::multiparameter::truc_interface::Persistence_backend_cohomology<PresentationStructure>;
};

template <bool is_vine, Available_columns col>
Expand All @@ -128,5 +128,5 @@ template <BackendsEnum backend,
bool is_kcritical,
typename value_type,
Available_columns col = Available_columns::INTRUSIVE_SET>
using TrucPythonInterface = Gudhi::multiparameter::interface::
using TrucPythonInterface = Gudhi::multiparameter::truc_interface::
Truc<PersBackendOpts<backend, is_vine, col>, StructureStuff<backend>, filtration_options<is_kcritical, value_type>>;
2 changes: 1 addition & 1 deletion multipers/gudhi/mma_interface_coh.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

namespace Gudhi {
namespace multiparameter {
namespace interface {
namespace truc_interface {

template <class Structure>
class Boundary_matrix_as_filtered_complex_for_coh {
Expand Down
2 changes: 1 addition & 1 deletion multipers/gudhi/mma_interface_h0.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

namespace Gudhi {
namespace multiparameter {
namespace interface {
namespace truc_interface {

template <class Boundary_matrix_type> class Persistence_backend_h0 {
public:
Expand Down
2 changes: 1 addition & 1 deletion multipers/gudhi/mma_interface_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

namespace Gudhi {
namespace multiparameter {
namespace interface {
namespace truc_interface {

template <Gudhi::persistence_matrix::Column_types column_type = Gudhi::persistence_matrix::Column_types::INTRUSIVE_SET>
struct Multi_persistence_options : Gudhi::persistence_matrix::Default_options<column_type, true> {
Expand Down
2 changes: 1 addition & 1 deletion multipers/gudhi/truc.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace Gudhi {
namespace multiparameter {
namespace interface {
namespace truc_interface {
using index_type = std::uint32_t;

class PresentationStructure {
Expand Down
14 changes: 7 additions & 7 deletions multipers/multi_parameter_rank_invariant/hilbert_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ void get_hilbert_surface_python(python_interface::Simplex_tree_multi_interface<F

template <typename PersBackend, typename Structure, typename Filtration, typename dtype, typename index_type>
inline void compute_2d_hilbert_surface(
tbb::enumerable_thread_specific<std::pair<typename interface::Truc<PersBackend, Structure, Filtration>::ThreadSafe,
tbb::enumerable_thread_specific<std::pair<typename truc_interface::Truc<PersBackend, Structure, Filtration>::ThreadSafe,
std::vector<index_type>>> &thread_stuff,
const tensor::static_tensor_view<dtype, index_type> &out, // assumes its a zero tensor
const std::vector<index_type> grid_shape,
Expand Down Expand Up @@ -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<PersBackend, Structure, Filtration>::split_barcode;
using bc_type = typename truc_interface::Truc<PersBackend, Structure, Filtration>::split_barcode;
if constexpr (PersBackend::is_vine) {
if (!slicer.has_persistence()) [[unlikely]] {
slicer.compute_persistence();
Expand Down Expand Up @@ -568,7 +568,7 @@ inline void compute_2d_hilbert_surface(

template <typename PersBackend, typename Structure, typename Filtration, typename dtype, typename index_type>
void _rec_get_hilbert_surface(
tbb::enumerable_thread_specific<std::pair<typename interface::Truc<PersBackend, Structure, Filtration>::ThreadSafe,
tbb::enumerable_thread_specific<std::pair<typename truc_interface::Truc<PersBackend, Structure, Filtration>::ThreadSafe,
std::vector<index_type>>> &thread_stuff,
const tensor::static_tensor_view<dtype, index_type> &out, // assumes its a zero tensor
const std::vector<index_type> grid_shape,
Expand Down Expand Up @@ -617,7 +617,7 @@ void _rec_get_hilbert_surface(
}

template <typename PersBackend, typename Structure, typename Filtration, typename dtype, typename index_type>
void get_hilbert_surface(interface::Truc<PersBackend, Structure, Filtration> &slicer,
void get_hilbert_surface(truc_interface::Truc<PersBackend, Structure, Filtration> &slicer,
const tensor::static_tensor_view<dtype, index_type> &out, // assumes its a zero tensor
const std::vector<index_type> &grid_shape,
const std::vector<index_type> &degrees,
Expand All @@ -629,7 +629,7 @@ void get_hilbert_surface(interface::Truc<PersBackend, Structure, Filtration> &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<PersBackend, Structure, Filtration>::ThreadSafe;
using ThreadSafe = typename truc_interface::Truc<PersBackend, Structure, Filtration>::ThreadSafe;
ThreadSafe slicer_thread(slicer);
std::vector<index_type> coordinates_container(slicer_thread.num_parameters() + 1); // +1 for degree
// coordinates_container.reserve(fixed_values.size()+1);
Expand All @@ -649,7 +649,7 @@ template <typename PersBackend,
typename dtype,
typename indices_type,
typename... Args>
void get_hilbert_surface_python(interface::Truc<PersBackend, Structure, Filtration> &slicer,
void get_hilbert_surface_python(truc_interface::Truc<PersBackend, Structure, Filtration> &slicer,
dtype *data_ptr,
std::vector<indices_type> grid_shape,
const std::vector<indices_type> degrees,
Expand Down Expand Up @@ -702,7 +702,7 @@ template <typename PersBackend,
typename indices_type,
typename... Args>
std::pair<std::vector<std::vector<indices_type>>, std::vector<dtype>> get_hilbert_signed_measure(
interface::Truc<PersBackend, Structure, Filtration> &slicer,
truc_interface::Truc<PersBackend, Structure, Filtration> &slicer,
dtype *data_ptr,
std::vector<indices_type> grid_shape,
const std::vector<indices_type> degrees,
Expand Down
14 changes: 7 additions & 7 deletions multipers/multi_parameter_rank_invariant/rank_invariant.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::pair<>>;grid
template <typename index_type>
Expand Down Expand Up @@ -167,7 +167,7 @@ template <class PersBackend,
typename dtype,
typename index_type>
inline void compute_2d_rank_invariant_of_elbow(
typename interface::Truc<PersBackend, Structure, MultiFiltration>::ThreadSafe &slicer, // truc slicer
typename truc_interface::Truc<PersBackend, Structure, MultiFiltration>::ThreadSafe &slicer, // truc slicer
const tensor::static_tensor_view<dtype, index_type> &out, // assumes its a zero tensor
const index_type I,
const index_type J,
Expand Down Expand Up @@ -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<PersBackend, Structure, MultiFiltration>::split_barcode;
using bc_type = typename truc_interface::Truc<PersBackend, Structure, MultiFiltration>::split_barcode;
bc_type barcodes;
if constexpr (PersBackend::is_vine) {
// slicer.set_one_filtration(one_persistence);
Expand Down Expand Up @@ -275,7 +275,7 @@ template <class PersBackend,
typename dtype,
typename index_type>
inline void compute_2d_rank_invariant(
interface::Truc<PersBackend, Structure, MultiFiltration> &slicer,
truc_interface::Truc<PersBackend, Structure, MultiFiltration> &slicer,
const tensor::static_tensor_view<dtype, index_type> &out, // assumes its a zero tensor
const std::vector<index_type> &grid_shape,
const std::vector<index_type> &degrees,
Expand All @@ -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<PersBackend, Structure, MultiFiltration>::ThreadSafe;
using ThreadSafe = typename truc_interface::Truc<PersBackend, Structure, MultiFiltration>::ThreadSafe;
ThreadSafe slicer_thread(slicer);
tbb::enumerable_thread_specific<ThreadSafe> thread_locals(slicer_thread);
tbb::parallel_for(0, X, [&](index_type I) {
Expand All @@ -307,7 +307,7 @@ template <class PersBackend,
class MultiFiltration = Gudhi::multi_filtration::One_critical_filtration<float>,
typename dtype,
typename indices_type>
void compute_rank_invariant_python(interface::Truc<PersBackend, Structure, MultiFiltration> slicer,
void compute_rank_invariant_python(truc_interface::Truc<PersBackend, Structure, MultiFiltration> slicer,
dtype *data_ptr,
const std::vector<indices_type> grid_shape,
const std::vector<indices_type> degrees,
Expand All @@ -327,7 +327,7 @@ template <typename PersBackend,
typename dtype = int,
typename indices_type = int>
std::pair<std::vector<std::vector<indices_type>>, std::vector<dtype>> compute_rank_signed_measure(
interface::Truc<PersBackend, Structure, MultiFiltration> slicer,
truc_interface::Truc<PersBackend, Structure, MultiFiltration> slicer,
dtype *data_ptr,
const std::vector<indices_type> grid_shape,
const std::vector<indices_type> degrees,
Expand Down

0 comments on commit f39eadf

Please sign in to comment.