diff options
author | skachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-02-01 10:53:59 +0000 |
---|---|---|
committer | skachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-02-01 10:53:59 +0000 |
commit | 1e65604043337b4bada05f431eb8f45a5691fae4 (patch) | |
tree | 3110f300406c60b5f3f6e910b5fcca9b67e24c2a /src/Witness_complex/concept | |
parent | 2479359771875ee216de4962234aa5ea373978cc (diff) |
The rest of the comments
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/relaxed-witness@2042 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 21b83788d916fdcf2ae265f73dad808b707066e6
Diffstat (limited to 'src/Witness_complex/concept')
-rw-r--r-- | src/Witness_complex/concept/Simplicial_complex_for_witness.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/src/Witness_complex/concept/Simplicial_complex_for_witness.h b/src/Witness_complex/concept/Simplicial_complex_for_witness.h index df294f19..1dee1a57 100644 --- a/src/Witness_complex/concept/Simplicial_complex_for_witness.h +++ b/src/Witness_complex/concept/Simplicial_complex_for_witness.h @@ -29,7 +29,7 @@ namespace witness_complex { /** \brief The concept SimplicialComplexForWitness describes the requirements * for a type to implement a simplicial complex, - * used for example to build a Witness_complex. + * used for example to build a Witness_complex or Strong_witness_complex. */ struct SimplicialComplexForWitness { /** Handle to specify a simplex. */ @@ -37,10 +37,14 @@ struct SimplicialComplexForWitness { /** Handle to specify a vertex. Must be a non-negative integer. */ typedef unspecified Vertex_handle; - /** Returns a Simplex_hanlde that is different from all simplex handles + /** \brief Returns a Simplex_hanlde that is different from all simplex handles * of the simplices. */ Simplex_handle null_simplex(); + /** Returns the number of vertices in the simplicial complex + */ + std::size_t num_vertices(); + /** \brief Iterator over the simplices of the complex, * in an arbitrary order. * @@ -68,16 +72,42 @@ struct SimplicialComplexForWitness { /** \brief Inserts a simplex with vertices from a given range * 'vertex_range' in the simplicial complex. + * The simplex is given the filtration value 'filtration'. + * Filtration_value should be convertible from double. + * The return type is not used. * */ template< typedef Input_vertex_range > - Insertion_result_type insert_simplex(Input_vertex_range const & vertex_range); + Insertion_result_type insert_simplex(Input_vertex_range const & vertex_range, Filtration_value filtration); + + /** \brief Inserts a simplex and all its faces + * with vertices from a given range + * 'vertex_range' in the simplicial complex. + * All inserted simplices are given the filtration + * value 'filtration'. + * Filtration_value should be convertible from double. + * The return type is not used. + */ + template< typedef Input_vertex_range, + typedef Filtration_value> + Insertion_result_type insert_simplex_and_subfaces(Input_vertex_range const & vertex_range, Filtration_value filtration); + /** \brief Finds a simplex with vertices given by a range * * If a simplex exists, its Simplex_handle is returned. * Otherwise null_simplex() is returned. */ template< typedef Input_vertex_range > Simplex_handle find(Input_vertex_range const & vertex_range); + + /** \brief Sets the dimension of the simplicial complex to + * 'dimension'. + */ + void set_dimension(int dimension); + + /** \brief Returns the filtration of the simplex given by + * the simplex handle 'sh'. + */ + double filtration(Simplex_handle sh); }; } // namespace witness_complex |