summaryrefslogtreecommitdiff
path: root/src/Persistence_representations/include/gudhi/common_persistence_representations.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Persistence_representations/include/gudhi/common_persistence_representations.h')
-rw-r--r--src/Persistence_representations/include/gudhi/common_persistence_representations.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/Persistence_representations/include/gudhi/common_persistence_representations.h b/src/Persistence_representations/include/gudhi/common_persistence_representations.h
index f223079a..f571ca4f 100644
--- a/src/Persistence_representations/include/gudhi/common_persistence_representations.h
+++ b/src/Persistence_representations/include/gudhi/common_persistence_representations.h
@@ -4,7 +4,7 @@
*
* Author(s): Pawel Dlotko
*
- * Copyright (C) 2015 INRIA (France)
+ * Copyright (C) 2017 INRIA (France)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,15 +20,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef common_gudhi_stat_H
-#define common_gudhi_stat_H
+#ifndef COMMON_PERSISTENCE_REPRESENTATIONS_H_
+#define COMMON_PERSISTENCE_REPRESENTATIONS_H_
namespace Gudhi
{
namespace Persistence_representations
{
- //this file contain an implementation of some common procedures used in Gudhi_stat.
+ //this file contain an implementation of some common procedures used in Persistence_representations.
//double epsi = std::numeric_limits<double>::epsilon();
double epsi = 0.000005;
@@ -38,8 +38,8 @@ double epsi = 0.000005;
/**
- * A procedure used to compare doubles. Typically gien two doubles A and B, comparing A == B is not good idea. In this case, we use the procedure almostEqual with the epsi defined at
- * the top of the file. Setting up the epsi give the user a tolerance on what should be consider equal.
+ * A procedure used to compare doubles. Typically given two doubles A and B, comparing A == B is not good idea. In this case, we use the procedure almostEqual with the epsi defined at
+ * the top of the file. Setting up the epsi gives the user a tolerance on what should be consider equal.
**/
inline bool almost_equal( double a , double b )
{
@@ -78,7 +78,7 @@ std::pair<double,double> compute_parameters_of_a_line( std::pair<double,double>
//landscapes
/**
- * This procedure given two points which lies on the opposide sides of x axis, compute x for which the line connecting those two points crosses x axis.
+ * This procedure given two points which lies on the opposite sides of x axis, compute x for which the line connecting those two points crosses x axis.
**/
double find_zero_of_a_line_segment_between_those_two_points ( std::pair<double,double> p1, std::pair<double,double> p2 )
{
@@ -86,7 +86,7 @@ double find_zero_of_a_line_segment_between_those_two_points ( std::pair<double,d
if ( p1.second*p2.second > 0 )
{
std::ostringstream errMessage;
- errMessage <<"In function find_zero_of_a_line_segment_between_those_two_points the agguments are: (" << p1.first << "," << p1.second << ") and (" << p2.first << "," << p2.second << "). There is no zero in line between those two points. Program terminated.";
+ errMessage <<"In function find_zero_of_a_line_segment_between_those_two_points the arguments are: (" << p1.first << "," << p1.second << ") and (" << p2.first << "," << p2.second << "). There is no zero in line between those two points. Program terminated.";
std::string errMessageStr = errMessage.str();
const char* err = errMessageStr.c_str();
throw(err);
@@ -94,8 +94,6 @@ double find_zero_of_a_line_segment_between_those_two_points ( std::pair<double,d
//we assume here, that x \in [ p1.first, p2.first ] and p1 and p2 are points between which we will put the line segment
double a = (p2.second - p1.second)/(p2.first - p1.first);
double b = p1.second - a*p1.first;
- //cerr << "Line crossing points : (" << p1.first << "," << p1.second << ") oraz (" << p2.first << "," << p2.second << ") : \n";
- //cerr << "a : " << a << " , b : " << b << " , x : " << x << endl;
return -b/a;
}
@@ -103,7 +101,7 @@ double find_zero_of_a_line_segment_between_those_two_points ( std::pair<double,d
//landscapes
/**
- * 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
+ * This method provides a comparison of points that is used in construction of persistence landscapes. The ordering 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 )
@@ -135,7 +133,7 @@ bool compare_points_sorting( std::pair<double,double> f, std::pair<double,double
//landscapes
/**
- * This procedure takes two points in R^2 and a double value x. It conputes the line pasing through those two points and return the value of that linear function at x.
+ * This procedure takes two points in R^2 and a double value x. It computes the line parsing through those two points and return the value of that linear function at x.
**/
double function_value ( std::pair<double,double> p1, std::pair<double,double> p2 , double x )
{
@@ -148,7 +146,7 @@ double function_value ( std::pair<double,double> p1, std::pair<double,double> p2
-}//namespace Gudhi_stat
-}//namespace Gudhi
+} // namespace Persistence_representations
+} // namespace Gudhi
-#endif
+#endif // COMMON_PERSISTENCE_REPRESENTATIONS_H_