summaryrefslogtreecommitdiff
path: root/src/Simplex_tree
diff options
context:
space:
mode:
authorglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-11-09 16:54:45 +0000
committerglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-11-09 16:54:45 +0000
commita57e87727ea3cbf73ac8e4ce0fe65a19de1fe2d9 (patch)
tree497425a6e13e0d1be4aa6e7ded3de380c82b42ca /src/Simplex_tree
parentb6c3298ce211935f65cc174cc86c0c6a5073035f (diff)
New Simplex_tree_options_fast_persistence, while Simplex_tree_options_full_featured switches to the safe default of allowing non-contiguous vertices.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/contiguous_vertices@896 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 60bc11a90027ed17233903d22a6494198f30eeb1
Diffstat (limited to 'src/Simplex_tree')
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h36
-rw-r--r--src/Simplex_tree/test/simplex_tree_unit_test.cpp2
2 files changed, 27 insertions, 11 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h
index 74ae1713..b9c2a245 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h
@@ -77,16 +77,7 @@ namespace Gudhi {
* @{
*/
-/// Model of SimplexTreeOptions.
-struct Simplex_tree_options_full_featured {
- typedef linear_indexing_tag Indexing_tag;
- typedef int Vertex_handle;
- typedef double Filtration_value;
- typedef int Simplex_key;
- static const bool store_key = true;
- static const bool store_filtration = true;
- static const bool contiguous_vertices = true;
-};
+struct Simplex_tree_options_full_featured;
/**
* \brief Simplex Tree data structure for representing simplicial complexes.
@@ -1159,6 +1150,31 @@ std::istream& operator>>(std::istream & is, Simplex_tree<T...> & st) {
return is;
}
+
+/// Model of SimplexTreeOptions.
+struct Simplex_tree_options_full_featured {
+ typedef linear_indexing_tag Indexing_tag;
+ typedef int Vertex_handle;
+ typedef double Filtration_value;
+ typedef int Simplex_key;
+ static const bool store_key = true;
+ static const bool store_filtration = true;
+ static const bool contiguous_vertices = false;
+};
+
+/** Model of SimplexTreeOptions, faster than
+ `Simplex_tree_options_full_featured` but note the unsafe
+ `contiguous_vertices` option. */
+struct Simplex_tree_options_fast_persistence {
+ typedef linear_indexing_tag Indexing_tag;
+ typedef int Vertex_handle;
+ typedef float Filtration_value;
+ typedef int Simplex_key;
+ static const bool store_key = true;
+ static const bool store_filtration = true;
+ static const bool contiguous_vertices = true;
+};
+
/** @} */ // end defgroup simplex_tree
} // namespace Gudhi
diff --git a/src/Simplex_tree/test/simplex_tree_unit_test.cpp b/src/Simplex_tree/test/simplex_tree_unit_test.cpp
index fff00d77..c2e214c0 100644
--- a/src/Simplex_tree/test/simplex_tree_unit_test.cpp
+++ b/src/Simplex_tree/test/simplex_tree_unit_test.cpp
@@ -509,7 +509,7 @@ BOOST_AUTO_TEST_CASE(NSimplexAndSubfaces_tree_insertion) {
// Find in the simplex_tree
// ------------------------------------------------------------------------------------------------------------------
typeVectorVertex simpleSimplexVector{1};
- Simplex_tree<>::Simplex_handle simplexFound = st.find(simpleSimplexVector);
+ typeST::Simplex_handle simplexFound = st.find(simpleSimplexVector);
std::cout << "**************IS THE SIMPLEX {1} IN THE SIMPLEX TREE ?\n";
if (simplexFound != st.null_simplex())
std::cout << "***+ YES IT IS!\n";