summaryrefslogtreecommitdiff
path: root/concept/Witness_complex
diff options
context:
space:
mode:
Diffstat (limited to 'concept/Witness_complex')
-rw-r--r--concept/Witness_complex/SimplicialComplexForWitness.h (renamed from concept/Witness_complex/Simplicial_complex_for_witness.h)65
1 files changed, 39 insertions, 26 deletions
diff --git a/concept/Witness_complex/Simplicial_complex_for_witness.h b/concept/Witness_complex/SimplicialComplexForWitness.h
index caaf0db6..d78cc83f 100644
--- a/concept/Witness_complex/Simplicial_complex_for_witness.h
+++ b/concept/Witness_complex/SimplicialComplexForWitness.h
@@ -27,57 +27,70 @@ namespace Gudhi {
namespace witness_complex {
-/** \brief The concept Simplicial_Complex describes the requirements
+/** \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. */
typedef unspecified Simplex_handle;
- /** Handle to specify a vertex. Must be a non-negative integer. */
- typedef unspecified Vertex_handle;
+ // /** 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();
- /** \brief Iterator over the simplices of the complex,
- * in an arbitrary order.
- *
- * 'value_type' must be 'Simplex_handle'.*/
- typedef unspecified Complex_simplex_range;
-
- /**
- * \brief Returns a range over all the simplices of a
- * complex.
+ /** Returns the number of vertices in the simplicial complex
*/
- Complex_simplex_range complex_simplex_range();
-
- /** \brief Iterator over vertices of a simplex.
- *
- * 'value type' must be 'Vertex_handle'.*/
- typedef unspecified Simplex_vertex_range;
-
- /** \brief Returns a range over vertices of a given
- * simplex. */
- Simplex_vertex_range simplex_vertex_range(Simplex_handle const & simplex);
-
+ std::size_t num_vertices();
+
/** \brief Return type of an insertion of a simplex
*/
typedef unspecified Insertion_result_type;
/** \brief Inserts a simplex with vertices from a given range
* 'vertex_range' in the simplicial complex.
+ * The function is only used in Witness_complex class
+ * and by construction, it is not necessary to check if
+ * the faces are in the simplicial complex before insertion.
+ * 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.
+ * The function is only used in Strong_witness_complex class.
+ * 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