summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-12-14 08:31:41 +0000
committerpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-12-14 08:31:41 +0000
commit68bf758eacef58672cefbc1955c4dec9e2b2786a (patch)
tree1b654b15ba6f5842f8aac22c8cdeee6d73aa43ac
parentd78f9b038e49e711d45bb0a2e9696ba2b5765262 (diff)
Answer to Marc's comments.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@1866 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ae35af534f570916a725e244521d947b91ec8f3b
-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