diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/include/gudhi/writing_persistence_to_file.h | 8 |
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 |