summaryrefslogtreecommitdiff
path: root/example/Simplex_tree/simple_simplex_tree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'example/Simplex_tree/simple_simplex_tree.cpp')
-rw-r--r--example/Simplex_tree/simple_simplex_tree.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/example/Simplex_tree/simple_simplex_tree.cpp b/example/Simplex_tree/simple_simplex_tree.cpp
index 5146b906..60f9a35e 100644
--- a/example/Simplex_tree/simple_simplex_tree.cpp
+++ b/example/Simplex_tree/simple_simplex_tree.cpp
@@ -4,7 +4,7 @@
*
* Author(s): Vincent Rouvreau
*
- * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France)
+ * Copyright (C) 2014
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,10 +27,11 @@
#include <utility> // for pair
#include <vector>
-using namespace Gudhi;
-
-typedef std::vector< Vertex_handle > typeVectorVertex;
-typedef std::pair< Simplex_tree<>::Simplex_handle, bool > typePairSimplexBool;
+using Simplex_tree = Gudhi::Simplex_tree<>;
+using Vertex_handle = Simplex_tree::Vertex_handle;
+using Filtration_value = Simplex_tree::Filtration_value;
+using typeVectorVertex = std::vector< Vertex_handle >;
+using typePairSimplexBool = std::pair< Simplex_tree::Simplex_handle, bool >;
int main(int argc, char * const argv[]) {
const Filtration_value FIRST_FILTRATION_VALUE = 0.1;
@@ -42,7 +43,7 @@ int main(int argc, char * const argv[]) {
std::cout << "********************************************************************" << std::endl;
std::cout << "EXAMPLE OF SIMPLE INSERTION" << std::endl;
// Construct the Simplex Tree
- Simplex_tree<> simplexTree;
+ Simplex_tree simplexTree;
/* Simplex to be inserted: */
/* 1 */
@@ -212,7 +213,7 @@ int main(int argc, char * const argv[]) {
// ------------------------------------------------------------------------------------------------------------------
// Find in the simplex_tree
// ------------------------------------------------------------------------------------------------------------------
- Simplex_tree<>::Simplex_handle simplexFound = simplexTree.find(secondSimplexVector);
+ Simplex_tree::Simplex_handle simplexFound = simplexTree.find(secondSimplexVector);
std::cout << "**************IS THE SIMPLEX {1} IN THE SIMPLEX TREE ?\n";
if (simplexFound != simplexTree.null_simplex())
std::cout << "***+ YES IT IS!\n";