summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Gudhi_stat/include/gudhi/common_gudhi_stat.h12
-rw-r--r--src/Gudhi_stat/include/gudhi/concretizations/Persistence_landscape_on_grid.h4
2 files changed, 5 insertions, 11 deletions
diff --git a/src/Gudhi_stat/include/gudhi/common_gudhi_stat.h b/src/Gudhi_stat/include/gudhi/common_gudhi_stat.h
index 1767b1be..22887021 100644
--- a/src/Gudhi_stat/include/gudhi/common_gudhi_stat.h
+++ b/src/Gudhi_stat/include/gudhi/common_gudhi_stat.h
@@ -34,8 +34,6 @@ namespace Gudhi_stat
double epsi = 0.000005;
-double plus_( double a,double b ){return a+b;}
-double minus_( double a,double b ){return a-b;}
@@ -105,7 +103,8 @@ double find_zero_of_a_line_segment_between_those_two_points ( std::pair<double,d
//landscapes
/**
- * Lexicographical ordering of points .
+ * This method provides a comparision of points that is used in construction of persistence landscapes. The orderign is lexicographical for the first coordinate, and reverse-lexicographical for the
+ * second coordinate.
**/
bool compare_points_sorting( std::pair<double,double> f, std::pair<double,double> s )
{
@@ -146,12 +145,7 @@ double function_value ( std::pair<double,double> p1, std::pair<double,double> p2
return (a*x+b);
}
-//landscapes on a grid
-struct greater_landscapes_on_grid
-{
- template<class T>
- bool operator()(T const &a, T const &b) const { return a > b; }
-};
+
}//namespace Gudhi_stat
diff --git a/src/Gudhi_stat/include/gudhi/concretizations/Persistence_landscape_on_grid.h b/src/Gudhi_stat/include/gudhi/concretizations/Persistence_landscape_on_grid.h
index 2f6422f9..b524e34a 100644
--- a/src/Gudhi_stat/include/gudhi/concretizations/Persistence_landscape_on_grid.h
+++ b/src/Gudhi_stat/include/gudhi/concretizations/Persistence_landscape_on_grid.h
@@ -1096,10 +1096,10 @@ void Persistence_landscape_on_grid::set_up_values_of_landscapes( const std::vect
}
}
- //and now we need to sort the valuesL
+ //and now we need to sort the values:
for ( size_t pt = 0 ; pt != this->values_of_landscapes.size() ; ++pt )
{
- std::sort( this->values_of_landscapes[pt].begin() , this->values_of_landscapes[pt].end() , greater_landscapes_on_grid() );
+ std::sort( this->values_of_landscapes[pt].begin() , this->values_of_landscapes[pt].end() , std::greater<double>() );
}
}//set_up_values_of_landscapes