diff options
Diffstat (limited to 'src/Persistence_representations')
2 files changed, 15 insertions, 13 deletions
diff --git a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h index 6eec26d6..4ceb9bf6 100644 --- a/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h +++ b/src/Persistence_representations/include/gudhi/Persistence_landscape_on_grid.h @@ -39,6 +39,7 @@ #include <functional> #include <utility> #include <string> +#include <cstdint> namespace Gudhi { namespace Persistence_representations { @@ -101,7 +102,7 @@ class Persistence_landscape_on_grid { **/ Persistence_landscape_on_grid(const char* filename, double grid_min_, double grid_max_, size_t number_of_points_, unsigned number_of_levels_of_landscape, - unsigned short dimension_ = std::numeric_limits<unsigned short>::max()); + uint16_t dimension_ = std::numeric_limits<uint16_t>::max()); /** * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the @@ -111,7 +112,7 @@ class Persistence_landscape_on_grid { * and the dimension of intervals that are need to be read from a file (in case of Gudhi format files). **/ Persistence_landscape_on_grid(const char* filename, double grid_min_, double grid_max_, size_t number_of_points_, - unsigned short dimension_ = std::numeric_limits<unsigned short>::max()); + uint16_t dimension_ = std::numeric_limits<uint16_t>::max()); /** * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the @@ -121,7 +122,7 @@ class Persistence_landscape_on_grid { * functions to be created. The remaining parameters are calculated based on data. **/ Persistence_landscape_on_grid(const char* filename, size_t number_of_points, unsigned number_of_levels_of_landscape, - unsigned short dimension = std::numeric_limits<unsigned short>::max()); + uint16_t dimension = std::numeric_limits<uint16_t>::max()); /** * Constructor that reads persistence intervals from file and creates persistence landscape. The format of the input @@ -133,7 +134,7 @@ class Persistence_landscape_on_grid { * The remaining parameters are calculated based on data. **/ Persistence_landscape_on_grid(const char* filename, size_t number_of_points, - unsigned short dimension = std::numeric_limits<unsigned short>::max()); + uint16_t dimension = std::numeric_limits<uint16_t>::max()); /** * This procedure loads a landscape from file. It erase all the data that was previously stored in this landscape. @@ -1095,9 +1096,9 @@ Persistence_landscape_on_grid::Persistence_landscape_on_grid(const std::vector<s } Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filename, double grid_min_, double grid_max_, - size_t number_of_points_, unsigned short dimension) { + size_t number_of_points_, uint16_t dimension) { std::vector<std::pair<double, double> > p; - if (dimension == std::numeric_limits<unsigned short>::max()) { + if (dimension == std::numeric_limits<uint16_t>::max()) { p = read_persistence_intervals_in_one_dimension_from_file(filename); } else { p = read_persistence_intervals_in_one_dimension_from_file(filename, dimension); @@ -1108,9 +1109,9 @@ Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filenam Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filename, double grid_min_, double grid_max_, size_t number_of_points_, unsigned number_of_levels_of_landscape, - unsigned short dimension) { + uint16_t dimension) { std::vector<std::pair<double, double> > p; - if (dimension == std::numeric_limits<unsigned short>::max()) { + if (dimension == std::numeric_limits<uint16_t>::max()) { p = read_persistence_intervals_in_one_dimension_from_file(filename); } else { p = read_persistence_intervals_in_one_dimension_from_file(filename, dimension); @@ -1119,9 +1120,9 @@ Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filenam } Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filename, size_t number_of_points_, - unsigned short dimension) { + uint16_t dimension) { std::vector<std::pair<double, double> > p; - if (dimension == std::numeric_limits<unsigned short>::max()) { + if (dimension == std::numeric_limits<uint16_t>::max()) { p = read_persistence_intervals_in_one_dimension_from_file(filename); } else { p = read_persistence_intervals_in_one_dimension_from_file(filename, dimension); @@ -1137,9 +1138,9 @@ Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filenam Persistence_landscape_on_grid::Persistence_landscape_on_grid(const char* filename, size_t number_of_points_, unsigned number_of_levels_of_landscape, - unsigned short dimension) { + uint16_t dimension) { std::vector<std::pair<double, double> > p; - if (dimension == std::numeric_limits<unsigned short>::max()) { + if (dimension == std::numeric_limits<uint16_t>::max()) { p = read_persistence_intervals_in_one_dimension_from_file(filename); } else { p = read_persistence_intervals_in_one_dimension_from_file(filename, dimension); diff --git a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp index cb7e282c..ffec8b3d 100644 --- a/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp +++ b/src/Persistence_representations/utilities/persistence_heat_maps/create_p_h_m_weighted_by_squared_diag_distance.cpp @@ -27,7 +27,8 @@ #include <limits> #include <vector> -using squared_distance_from_diagonal_scaling = Gudhi::Persistence_representations::squared_distance_from_diagonal_scaling; +using squared_distance_from_diagonal_scaling = + Gudhi::Persistence_representations::squared_distance_from_diagonal_scaling; using Persistence_heat_maps = Gudhi::Persistence_representations::Persistence_heat_maps<squared_distance_from_diagonal_scaling>; |