-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex2.h
70 lines (52 loc) · 1.65 KB
/
index2.h
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
Copyright (C) 2013-2017
Rafael Guglielmetti, rafael.guglielmetti@unifr.ch
*/
/*
This file is part of CoxIter.
CoxIter 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.
CoxIter 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 CoxIter. If not, see <http://www.gnu.org/licenses/>.
*/
/*!
* \file index2.h
* \author Rafael Guglielmetti
*
* \class Index2
* \brief Extract an index two subroup (based on Gal, Bonnafé-Dyer)
*/
#ifndef __INDEX2_H__
#define __INDEX2_H__
#include <string>
using namespace std;
#include "coxiter.h"
struct NewVertex {
string label;
unsigned int index;
unsigned int originVertex;
};
class Index2 {
private:
CoxIter *ci;
vector<vector<unsigned int>> coxeterMatrix; ///< Coxeter matrix
unsigned int verticesCount; ///< Number of vertices of the starting graph
unsigned int vertex; ///< Index of the vertex
vector<NewVertex> newVertices;
vector<vector<unsigned int>> iNewCox; ///< New Coxeter matrix
unsigned int iNewVerticesCount;
string error;
public:
Index2(CoxIter *ci);
bool isVertexAdmissible(const string &vertexLabel);
bool removeVertex(const string &vertexLabel);
void printMatrix(vector<vector<unsigned int>> *iMatrix);
string get_error() const;
};
#endif // __INDEX2_H__