11#ifndef WRITING_PERSISTENCE_TO_FILE_H_ 
   12#define WRITING_PERSISTENCE_TO_FILE_H_ 
   25template <
typename Filtration_type, 
typename Coefficient_field>
 
   34        dimension_(std::numeric_limits<unsigned>::max()),
 
   35        arith_element_(std::numeric_limits<Coefficient_field>::max()) {}
 
   41      : birth_(birth), death_(death), dimension_(dim), arith_element_(std::numeric_limits<Coefficient_field>::max()) {}
 
   48      : birth_(birth), death_(death), dimension_(dim), arith_element_(field) {}
 
   56    return ((this->birth_ == i2.birth_) && (this->death_ == i2.death_) && (this->dimension_ == i2.dimension_) &&
 
   57            (this->arith_element_ == i2.arith_element_));
 
   71    return fabs(this->death_ - this->birth_) < fabs(i2.death_ - i2.birth_);
 
   75    if (it.arith_element_ != std::numeric_limits<Coefficient_field>::max()) {
 
   76      out << it.arith_element_ << 
"  ";
 
   78    if (it.dimension_ != std::numeric_limits<unsigned>::max()) {
 
   79      out << it.dimension_ << 
" ";
 
   81    out << it.birth_ << 
" " << it.death_ << 
" ";
 
   86  Filtration_type birth_;
 
   87  Filtration_type death_;
 
   89  Coefficient_field arith_element_;
 
   95template <
typename Persistence_
interval_range>
 
   96void write_persistence_intervals_to_stream(
const Persistence_interval_range& intervals,
 
   97                                           std::ostream& out = std::cout) {
 
   98  for (
auto interval : intervals) {
 
   99    out << interval << 
"\n";
 
Definition: writing_persistence_to_file.h:26
bool operator==(const Persistence_interval_common &i2) const
Definition: writing_persistence_to_file.h:55
bool operator!=(const Persistence_interval_common &i2) const
Definition: writing_persistence_to_file.h:63
bool operator<(const Persistence_interval_common &i2) const
Definition: writing_persistence_to_file.h:70
Persistence_interval_common(Filtration_type birth, Filtration_type death)
Definition: writing_persistence_to_file.h:31
Persistence_interval_common(Filtration_type birth, Filtration_type death, unsigned dim)
Definition: writing_persistence_to_file.h:40
Persistence_interval_common(Filtration_type birth, Filtration_type death, unsigned dim, Coefficient_field field)
Definition: writing_persistence_to_file.h:47