From 4a089fe4840f09b4aabafa06ad53200baa6d6547 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 6 Jun 2016 14:54:17 +0000 Subject: bar code persistence tool Copyright modification git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@1251 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ff7a8baeffbcafe6d074786b6a7956d815edd21b --- .../example/gudhi_graphical_tools_example.py | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 src/cython/example/gudhi_graphical_tools_example.py (limited to 'src/cython/example/gudhi_graphical_tools_example.py') diff --git a/src/cython/example/gudhi_graphical_tools_example.py b/src/cython/example/gudhi_graphical_tools_example.py new file mode 100755 index 00000000..c43b2338 --- /dev/null +++ b/src/cython/example/gudhi_graphical_tools_example.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python + +import gudhi + +"""This file is part of the Gudhi Library. The Gudhi library + (Geometric Understanding in Higher Dimensions) is a generic C++ + library for computational topology. + + Author(s): Vincent Rouvreau + + Copyright (C) 2016 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +""" + +__author__ = "Vincent Rouvreau" +__copyright__ = "Copyright (C) 2016 INRIA" +__license__ = "GPL v3" + +print("#####################################################################") +print("Show palette colors values for dimension") + +gudhi.show_palette_values() + +print("#####################################################################") +print("Show bar code persistence example") + +persistence = [(2, (1.0, float('inf'))), (1, (1.4142135623730951, float('inf'))), + (1, (1.4142135623730951, float('inf'))), (0, (0.0, float('inf'))), + (0, (0.0, 1.0)), (0, (0.0, 1.0)), (0, (0.0, 1.0))] +gudhi.bar_code_persistence(persistence) -- cgit v1.2.3