#include <iostream>
 
 
 
struct RU_rep_cycles_options : Default_options<Column_types::INTRUSIVE_LIST, true> 
{
  static const bool can_retrieve_representative_cycles = true;
};
 
struct Chain_rep_cycles_options : Default_options<Column_types::INTRUSIVE_LIST, true> 
{
  static const bool can_retrieve_representative_cycles = true;
  static const bool is_of_boundary_type = false;
};
 
 
template <class Matrix>
void print_representative_cycles_example()
{
  Matrix mp({ { },
              { },
              { },
              { },
              { },
              { },
              { },
              { 2, 3 },
              { 4, 5 },
              { 0, 2 },
              { 0, 1 },
              { 1, 3 },
              { 1, 2 },
              { 7, 11, 12 },
              { 9, 10, 12 },
              { 5, 6 },
              { 2, 4 },
              { 4, 6 },
              { 8, 15, 17 },
              { 3, 6 } 
            });
 
  auto rc = mp.get_representative_cycles();
  for (auto cycle : rc) {
    
    
    
    
    
    
    
    
    
    std::cout << mp.get_column_dimension(cycle[0]);
    std::cout << "-cycle: ";
    for (auto index : cycle) {
      std::cout << index << ", ";
    }
    std::cout << "\n";
  }
}
 
int main() {
  std::cout << "RU_matrix:\n";
  print_representative_cycles_example<RU_matrix>();
  std::cout << "\n";
  std::cout << "Chain_matrix:\n";
  print_representative_cycles_example<Chain_matrix>();
}
Contains Gudhi::persistence_matrix::Matrix class.
 
Data structure for matrices, and in particular thought for matrices representing filtered complexes i...
Definition: Matrix.h:144
 
Column_types
List of column types.
Definition: persistence_matrix_options.h:30
 
Contains the options for the matrix template.
 
Default option structure for Matrix class. See the PersistenceMatrixOptions concept for a more detail...
Definition: persistence_matrix_options.h:79