#include <gudhi/Rips_complex.h>
#include <gudhi/Simplex_tree.h>
 
#include <iostream>
#include <string>
#include <vector>
#include <limits>  
 
int main() {
  
  using Distance_matrix = std::vector<std::vector<Filtration_value>>;
 
  
  
  
  
  
  
 
  Distance_matrix distances;
  distances.push_back({});
  distances.push_back({0.94});
  distances.push_back({0.77, 0.26});
  distances.push_back({0.99, 0.99, 0.28});
  distances.push_back({0.11, 0.39, 0.97, 0.30});
 
  
  
  
  double threshold = 1.0;
  Rips_complex rips_complex_from_points(distances, threshold);
 
 
  
  
  
  std::clog << 
"Rips complex is of dimension " << stree.
dimension() <<
 
  std::clog << "Iterator on Rips complex simplices in the filtration order, with [filtration value]:" <<
               std::endl;
    std::clog << "   ( ";
      std::clog << vertex << " ";
    }
    std::clog << 
") -> " << 
"[" << stree.
filtration(f_simplex) << 
"] ";
    std::clog << std::endl;
  }
 
  return 0;
}
Options::Filtration_value Filtration_value
Type for the value of the filtration function.
Definition: Simplex_tree.h:88
Filtration_simplex_range const & filtration_simplex_range(Indexing_tag=Indexing_tag())
Returns a range over the simplices of the simplicial complex, in the order of the filtration.
Definition: Simplex_tree.h:273
Simplex_vertex_range simplex_vertex_range(Simplex_handle sh) const
Returns a range over the vertices of a simplex.
Definition: Simplex_tree.h:284
static Filtration_value filtration(Simplex_handle sh)
Returns the filtration value of a simplex.
Definition: Simplex_tree.h:537
size_t num_vertices() const
Returns the number of vertices in the complex.
Definition: Simplex_tree.h:574
int dimension(Simplex_handle sh)
Returns the dimension of a simplex.
Definition: Simplex_tree.h:602
size_t num_simplices()
returns the number of simplices in the simplex_tree.
Definition: Simplex_tree.h:580
Rips complex data structure.
Definition: Rips_complex.h:45
void create_complex(SimplicialComplexForRips &complex, int dim_max)
Initializes the simplicial complex from the Rips graph and expands it until a given maximal dimension...
Definition: Rips_complex.h:101
Global distance functions.
Value type for a filtration function on a cell complex.
Definition: FiltrationValue.h:20