From 8d7329f3e5ad843e553c3c5503cecc28ef2eead6 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Thu, 20 Apr 2017 11:10:45 +0200 Subject: GUDHI 2.0.0 as released by upstream in a tarball. --- example/Skeleton_blocker/CMakeLists.txt | 14 +++++++------- .../Skeleton_blocker_from_simplices.cpp | 11 ++++------- .../Skeleton_blocker_iteration.cpp | 10 +++------- example/Skeleton_blocker/Skeleton_blocker_link.cpp | 22 ++++++++++------------ 4 files changed, 24 insertions(+), 33 deletions(-) (limited to 'example/Skeleton_blocker') diff --git a/example/Skeleton_blocker/CMakeLists.txt b/example/Skeleton_blocker/CMakeLists.txt index cc7f37f3..c887e408 100644 --- a/example/Skeleton_blocker/CMakeLists.txt +++ b/example/Skeleton_blocker/CMakeLists.txt @@ -1,12 +1,12 @@ cmake_minimum_required(VERSION 2.6) project(Skeleton_blocker_examples) -add_executable(SkeletonBlockerFromSimplices Skeleton_blocker_from_simplices.cpp) -add_executable(SkeletonBlockerIteration Skeleton_blocker_iteration.cpp) -add_executable(SkeletonBlockerLink Skeleton_blocker_link.cpp) +add_executable(Skeleton_blocker_example_from_simplices Skeleton_blocker_from_simplices.cpp) +add_executable(Skeleton_blocker_example_iteration Skeleton_blocker_iteration.cpp) +add_executable(Skeleton_blocker_example_link Skeleton_blocker_link.cpp) -target_link_libraries(SkeletonBlockerIteration ${Boost_TIMER_LIBRARY} ${Boost_SYSTEM_LIBRARY}) +target_link_libraries(Skeleton_blocker_example_iteration ${Boost_TIMER_LIBRARY} ${Boost_SYSTEM_LIBRARY}) -add_test(SkeletonBlockerFromSimplices ${CMAKE_CURRENT_BINARY_DIR}/SkeletonBlockerFromSimplices) -add_test(SkeletonBlockerIteration ${CMAKE_CURRENT_BINARY_DIR}/SkeletonBlockerIteration) -add_test(SkeletonBlockerLink ${CMAKE_CURRENT_BINARY_DIR}/SkeletonBlockerLink) +add_test(NAME Skeleton_blocker_example_from_simplices COMMAND $) +add_test(NAME Skeleton_blocker_example_iteration COMMAND $) +add_test(NAME Skeleton_blocker_example_link COMMAND $) diff --git a/example/Skeleton_blocker/Skeleton_blocker_from_simplices.cpp b/example/Skeleton_blocker/Skeleton_blocker_from_simplices.cpp index 171f35f2..076c6a53 100644 --- a/example/Skeleton_blocker/Skeleton_blocker_from_simplices.cpp +++ b/example/Skeleton_blocker/Skeleton_blocker_from_simplices.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 INRIA * * 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 @@ -29,11 +29,8 @@ #include #include -using namespace std; -using namespace Gudhi; -using namespace skeleton_blocker; - -typedef Skeleton_blocker_complex Complex; +typedef Gudhi::skeleton_blocker::Skeleton_blocker_simple_traits Traits; +typedef Gudhi::skeleton_blocker::Skeleton_blocker_complex Complex; typedef Complex::Vertex_handle Vertex_handle; typedef Complex::Simplex Simplex; @@ -47,7 +44,7 @@ int main(int argc, char *argv[]) { simplices.push_back(Simplex(Vertex_handle(3), Vertex_handle(0), Vertex_handle(1))); // get complex from top faces - Complex complex(make_complex_from_top_faces(simplices.begin(), simplices.end())); + Complex complex(Gudhi::skeleton_blocker::make_complex_from_top_faces(simplices.begin(), simplices.end())); std::cout << "Simplices:" << std::endl; diff --git a/example/Skeleton_blocker/Skeleton_blocker_iteration.cpp b/example/Skeleton_blocker/Skeleton_blocker_iteration.cpp index 8d9d1a67..6a1bc480 100644 --- a/example/Skeleton_blocker/Skeleton_blocker_iteration.cpp +++ b/example/Skeleton_blocker/Skeleton_blocker_iteration.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 INRIA * * 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 @@ -30,12 +30,8 @@ #include #include - -using namespace std; -using namespace Gudhi; -using namespace skeleton_blocker; - -typedef Skeleton_blocker_complex Complex; +typedef Gudhi::skeleton_blocker::Skeleton_blocker_simple_traits Traits; +typedef Gudhi::skeleton_blocker::Skeleton_blocker_complex Complex; typedef Complex::Vertex_handle Vertex_handle; typedef Complex::Simplex Simplex; diff --git a/example/Skeleton_blocker/Skeleton_blocker_link.cpp b/example/Skeleton_blocker/Skeleton_blocker_link.cpp index 1f937170..58322038 100644 --- a/example/Skeleton_blocker/Skeleton_blocker_link.cpp +++ b/example/Skeleton_blocker/Skeleton_blocker_link.cpp @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 INRIA * * 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 @@ -28,11 +28,8 @@ #include #include -using namespace std; -using namespace Gudhi; -using namespace skeleton_blocker; - -typedef Skeleton_blocker_complex Complex; +typedef Gudhi::skeleton_blocker::Skeleton_blocker_simple_traits Traits; +typedef Gudhi::skeleton_blocker::Skeleton_blocker_complex Complex; typedef Complex::Vertex_handle Vertex_handle; typedef Complex::Root_vertex_handle Root_vertex_handle; typedef Complex::Simplex Simplex; @@ -47,25 +44,26 @@ int main(int argc, char *argv[]) { Simplex tetrahedron(Vertex_handle(0), Vertex_handle(1), Vertex_handle(2), Vertex_handle(3)); complex.add_simplex(tetrahedron); - cout << "complex:" << complex.to_string() << endl; + std::cout << "complex:" << complex.to_string() << std::endl; // build the link of vertex 1, eg a triangle {0,2,3} auto link = complex.link(Vertex_handle(1)); - cout << "link:" << link.to_string() << endl; + std::cout << "link:" << link.to_string() << std::endl; // Internally link is a subcomplex of 'complex' and its vertices are stored in a vector. // They can be accessed via Vertex_handle(x) where x is an index of the vector. // In that example, link has three vertices and thus it contains only // Vertex_handle(0),Vertex_handle(1) and Vertex_handle(2) are). for (int i = 0; i < 5; ++i) - cout << "link.contains_vertex(Vertex_handle(" << i << ")):" << link.contains_vertex(Vertex_handle(i)) << endl; - cout << endl; + std::cout << "link.contains_vertex(Vertex_handle(" << i << ")):" << link.contains_vertex(Vertex_handle(i)) << + std::endl; + std::cout << std::endl; // To access to the initial vertices eg (0,1,2,3,4), Root_vertex_handle must be used. // For instance, to test if the link contains the vertex that was labeled i: for (int i = 0; i < 5; ++i) - cout << "link.contains_vertex(Root_vertex_handle(" << i << ")):" << - link.contains_vertex(Root_vertex_handle(i)) << endl; + std::cout << "link.contains_vertex(Root_vertex_handle(" << i << ")):" << + link.contains_vertex(Root_vertex_handle(i)) << std::endl; return EXIT_SUCCESS; } -- cgit v1.2.3