#include <gudhi/Toplex_map.h>
 
#include <iostream>
#include <utility>  
#include <vector>
#include <cassert>
 
int main(int argc, char* const argv[]) {
  Simplex sigma1 = {1, 2, 3};
  Simplex sigma2 = {2, 3, 4, 5};
 
 
  
  
  
  
  
  
 
            << std::endl;
 
  
  Simplex sigma3 = {2, 3};
  std::clog << "Maximal cofaces of {2, 3} are :" << std::endl;
    for (auto v : *simplex_ptr) {
      std::clog << v << ", ";
    }
    std::clog << std::endl;
  }
 
  
  std::clog << "Maximal simplices are :" << std::endl;
    for (auto v : *simplex_ptr) {
      std::clog << v << ", ";
    }
    std::clog << std::endl;
  }
 
  Simplex sigma4 = {1, 3};
 
  std::clog << "After contraction(1, 3) - " << v << std::endl;
  
  
  
  
  
  
            << std::endl;
 
  
  std::clog << "Maximal simplices are :" << std::endl;
    for (auto v : *simplex_ptr) {
      std::clog << v << ", ";
    }
    std::clog << std::endl;
  }
 
  Simplex sigma5 = {3, 4};
 
  std::clog << "After contraction(3, 4) - " << v << std::endl;
  
  
  
  
  
  
            << std::endl;
 
  
  std::clog << "Maximal simplices are :" << std::endl;
    for (auto v : *simplex_ptr) {
      std::clog << v << ", ";
    }
    std::clog << std::endl;
  }
 
  
  
  
  
  
  
 
  std::clog << "After remove_simplex(1, 2, 3)" << std::endl;
  
  
  
  
  
  
            << std::endl;
 
  
  std::clog << "Maximal simplices are :" << std::endl;
    for (auto v : *simplex_ptr) {
      std::clog << v << ", ";
    }
    std::clog << std::endl;
  }
 
 
  std::clog << "After remove_vertex(1)" << std::endl;
  
  
  
  
  
  
            << std::endl;
 
  
  std::clog << "Maximal simplices are :" << std::endl;
    for (auto v : *simplex_ptr) {
      std::clog << v << ", ";
    }
    std::clog << std::endl;
  }
 
  return 0;
}
Toplex map data structure for representing unfiltered simplicial complexes.
Definition: Toplex_map.h:29
 
Toplex_map::Simplex_ptr_set maximal_cofaces(const Input_vertex_range &vertex_range, const std::size_t max_number=0) const
Definition: Toplex_map.h:187
 
void remove_vertex(const Vertex x)
Definition: Toplex_map.h:253
 
Toplex_map::Simplex_ptr_set maximal_simplices(const std::size_t max_number=0) const
Definition: Toplex_map.h:78
 
std::size_t num_vertices() const
Number of vertices.
Definition: Toplex_map.h:94
 
std::size_t num_maximal_simplices() const
Number of maximal simplices.
Definition: Toplex_map.h:91
 
bool membership(const Input_vertex_range &vertex_range) const
Definition: Toplex_map.h:169
 
Vertex contraction(const Vertex x, const Vertex y)
Definition: Toplex_map.h:211
 
void remove_simplex(const Input_vertex_range &vertex_range)
Removes the given simplex and its cofaces from the complex. Its faces are kept inside.
Definition: Toplex_map.h:151
 
std::set< Vertex > Simplex
Definition: Toplex_map.h:35
 
std::size_t Vertex
Definition: Toplex_map.h:32
 
void insert_simplex(const Input_vertex_range &vertex_range)
Adds the given simplex to the complex. Nothing happens if the simplex is already in the complex (i....
Definition: Toplex_map.h:130