summaryrefslogtreecommitdiff
path: root/src/common/include/gudhi/writing_persistence_to_file.h
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-04-03 15:05:53 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-04-03 15:05:53 +0000
commit423e06352d4498361ee81d6a23aa2c77dd58d1c8 (patch)
tree761590ac215b11e8c71b9b1c7087119032724518 /src/common/include/gudhi/writing_persistence_to_file.h
parentf9fa3467af7d1cb3e1797170d62c0cc6f87f8cf4 (diff)
Try to fix operator< for std::sort on CentOS
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3332 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: caaeb02c38a8adc8c09321e534f9b73181450acf
Diffstat (limited to 'src/common/include/gudhi/writing_persistence_to_file.h')
-rw-r--r--src/common/include/gudhi/writing_persistence_to_file.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/common/include/gudhi/writing_persistence_to_file.h b/src/common/include/gudhi/writing_persistence_to_file.h
index 49ccef84..766dd317 100644
--- a/src/common/include/gudhi/writing_persistence_to_file.h
+++ b/src/common/include/gudhi/writing_persistence_to_file.h
@@ -79,7 +79,7 @@ class Persistence_interval_common {
* One intervals is smaller than the other if it has lower persistence.
* Note that this operator do not take Arith_element into account when doing comparisions.
**/
- inline bool operator<(const Persistence_interval_common& i2) {
+ bool operator<(const Persistence_interval_common& i2) const {
return fabs(this->death_ - this->birth_) < fabs(i2.death_ - i2.birth_);
}
@@ -101,11 +101,6 @@ class Persistence_interval_common {
Coefficient_field arith_element_;
};
-template <typename Filtration_type, typename Coefficient_field>
-bool operator<(const Persistence_interval_common<Filtration_type, Coefficient_field>& i1,
- const Persistence_interval_common<Filtration_type, Coefficient_field>& i2) {
- return i1.operator<(i2);
- }
/**
* This function write a vector<Persistence_interval_common> to a stream
**/
@@ -116,6 +111,7 @@ void write_persistence_intervals_to_stream(const Persistence_interval_range& int
out << interval << "\n";
}
}
+
}
#endif // WRITING_PERSISTENCE_TO_FILE_H