1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/* 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) 2014 INRIA Sophia Antipolis-Méditerranée (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 <iostream>
#include <ctime>
//#include "gudhi/graph_simplicial_complex.h"
#include "gudhi/Witness_complex.h"
using namespace Gudhi;
typedef std::vector< Vertex_handle > typeVectorVertex;
//typedef std::pair<typeVectorVertex, Filtration_value> typeSimplex;
//typedef std::pair< Simplex_tree<>::Simplex_handle, bool > typePairSimplexBool;
int main (int argc, char * const argv[])
{
Witness_complex<> witnessComplex = Witness_complex<>();
std::vector< typeVectorVertex > KNN;
typeVectorVertex witness0 = {1,0,5,2,6,3,4}; KNN.push_back(witness0 );
typeVectorVertex witness1 = {2,6,4,5,0,1,3}; KNN.push_back(witness1 );
typeVectorVertex witness2 = {3,4,2,1,5,6,0}; KNN.push_back(witness2 );
typeVectorVertex witness3 = {4,2,1,3,5,6,0}; KNN.push_back(witness3 );
typeVectorVertex witness4 = {5,1,6,0,2,3,4}; KNN.push_back(witness4 );
typeVectorVertex witness5 = {6,0,5,2,1,3,4}; KNN.push_back(witness5 );
typeVectorVertex witness6 = {0,5,6,1,2,3,4}; KNN.push_back(witness6 );
typeVectorVertex witness7 = {2,6,4,5,3,1,0}; KNN.push_back(witness7 );
typeVectorVertex witness8 = {1,2,5,4,3,6,0}; KNN.push_back(witness8 );
typeVectorVertex witness9 = {3,4,0,6,5,1,2}; KNN.push_back(witness9 );
typeVectorVertex witness10 = {5,0,1,3,6,2,4}; KNN.push_back(witness10);
typeVectorVertex witness11 = {5,6,1,0,2,3,4}; KNN.push_back(witness11);
typeVectorVertex witness12 = {1,6,0,5,2,3,4}; KNN.push_back(witness12);
witnessComplex.witness_complex(KNN);
}
|