diff options
author | fgodi <fgodi@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-06-25 10:23:49 +0000 |
---|---|---|
committer | fgodi <fgodi@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2015-06-25 10:23:49 +0000 |
commit | 38af16a7b5b958b9f27f36a8b94bd8d0327117e8 (patch) | |
tree | 6dc376227dafe7c7eafca36dac6f36c6e160cbaa /src/Bottleneck/example/random_diagrams.cpp | |
parent | 6b78cf351666cc34ac81f9bd67df50f231c5f5fd (diff) |
example
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/bottleneckDistance@649 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 6bde13921757cba057eb37c314719d51de262649
Diffstat (limited to 'src/Bottleneck/example/random_diagrams.cpp')
-rw-r--r-- | src/Bottleneck/example/random_diagrams.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/Bottleneck/example/random_diagrams.cpp b/src/Bottleneck/example/random_diagrams.cpp deleted file mode 100644 index a9d0968d..00000000 --- a/src/Bottleneck/example/random_diagrams.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* 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): Francois Godi - * - * Copyright (C) 2015 INRIA Sophia-Antipolis (France) - * - * 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 <http://www.gnu.org/licenses/>. - */ - -#include "gudhi/Graph_matching.h" -#include <iostream> - -using namespace Gudhi::bottleneck; - -int main() { - int n = 100; - std::vector< std::pair<double, double> > v1, v2; - for (int i = 0; i < n; i++) { - int a = rand() % n; - v1.emplace_back(a, a + rand() % (n - a)); - int b = rand() % n; - v2.emplace_back(b, b + rand() % (n - b)); - } - // v1 and v2 are persistence diagrams containing each 100 randoms points. - double b = bottleneck_distance(v1, v2, 0); - std::cout << b << std::endl; -} |