summaryrefslogtreecommitdiff
path: root/src/Gudhi_stat/include
diff options
context:
space:
mode:
authorpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-12-12 08:10:13 +0000
committerpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-12-12 08:10:13 +0000
commit44a02b6f1c8e1615d57101d9855ddc9a70137156 (patch)
tree8c71a1e1f1e900141e0626457b739876e6ee7006 /src/Gudhi_stat/include
parent0234f4cfd97f6fb5dbf32ec165e85577b10db823 (diff)
Answer to Marc's comments.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@1849 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 3b6ae19e74797b51d8e911927b26fd5f93827f4e
Diffstat (limited to 'src/Gudhi_stat/include')
-rw-r--r--src/Gudhi_stat/include/gudhi/common.h43
-rw-r--r--src/Gudhi_stat/include/gudhi/concretizations/Persistence_landscape_on_grid.h4
-rw-r--r--src/Gudhi_stat/include/gudhi/concretizations/Vector_distances_in_diagram.h8
3 files changed, 6 insertions, 49 deletions
diff --git a/src/Gudhi_stat/include/gudhi/common.h b/src/Gudhi_stat/include/gudhi/common.h
deleted file mode 100644
index 916b4499..00000000
--- a/src/Gudhi_stat/include/gudhi/common.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* This file is part of the Gudhi Library. The Gudhi library
- * (Geometric Understanding in Higher Dimensions) is a generic C++
- * library for computational topology.
- *
- * Author(s): Pawel Dlotko
- *
- * Copyright (C) 2015 INRIA Sophia-Saclay (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
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef HAUSDORFF_DISTANCES_H
-#define HAUSDORFF_DISTANCES_H
- //this file contain an implementation of some common procedures used in Gudhi_stat.
-
-
-
-
- //double epsi = std::numeric_limits<double>::epsilon();
-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.
-**/
-inline bool almost_equal( double a , double b )
-{
- if ( fabs(a-b) < epsi )
- return true;
- return false;
-}
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 369d4a64..2f6422f9 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
@@ -316,7 +316,7 @@ public:
/**
- * A function that compute sum of two landscapes.
+ *\private A function that compute sum of two landscapes.
**/
friend Persistence_landscape_on_grid add_two_landscapes ( const Persistence_landscape_on_grid& land1 , const Persistence_landscape_on_grid& land2 )
{
@@ -324,7 +324,7 @@ public:
}
/**
- * A function that compute difference of two landscapes.
+ *\private A function that compute difference of two landscapes.
**/
friend Persistence_landscape_on_grid subtract_two_landscapes ( const Persistence_landscape_on_grid& land1 , const Persistence_landscape_on_grid& land2 )
{
diff --git a/src/Gudhi_stat/include/gudhi/concretizations/Vector_distances_in_diagram.h b/src/Gudhi_stat/include/gudhi/concretizations/Vector_distances_in_diagram.h
index d44fa862..7021e262 100644
--- a/src/Gudhi_stat/include/gudhi/concretizations/Vector_distances_in_diagram.h
+++ b/src/Gudhi_stat/include/gudhi/concretizations/Vector_distances_in_diagram.h
@@ -281,8 +281,8 @@ public:
/**
* This is a generic function that allows to perform binary operations on two Vector_distances_in_diagram. It will be used later to defien sums and differences of Vector_distances_in_diagram.
**/
- //template < typename Operation_type >
- friend Vector_distances_in_diagram operation_on_pair_of_vectors( const Vector_distances_in_diagram& first , const Vector_distances_in_diagram& second , double (*opertion)( double,double ) )
+ template < typename Operation_type >
+ friend Vector_distances_in_diagram operation_on_pair_of_vectors( const Vector_distances_in_diagram& first , const Vector_distances_in_diagram& second , Operation_type opertion )
{
Vector_distances_in_diagram result;
//Operation_type operation;
@@ -331,14 +331,14 @@ public:
**/
friend Vector_distances_in_diagram operator+( const Vector_distances_in_diagram& first , const Vector_distances_in_diagram& second )
{
- return operation_on_pair_of_vectors( first , second , plus_ );
+ return operation_on_pair_of_vectors( first , second , std::plus<double>() );
}
/**
* This function computes a difference of two objects of a type Vector_distances_in_diagram.
**/
friend Vector_distances_in_diagram operator-( const Vector_distances_in_diagram& first , const Vector_distances_in_diagram& second )
{
- return operation_on_pair_of_vectors( first , second , minus_ );
+ return operation_on_pair_of_vectors( first , second , std::minus<double>() );
}
/**
* This function computes a product of an object of a type Vector_distances_in_diagram with real number.