CoxIter  1.3
CoxIter - Computing invariants of hyperbolic Coxeter groups
arithmeticity.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2013-2017
3 Rafael Guglielmetti, rafael.guglielmetti@unifr.ch
4 */
5 
6 /*
7 This file is part of CoxIter.
8 
9 CoxIter is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as
11 published by the Free Software Foundation, either version 3 of the
12 License, or (at your option) any later version.
13 
14 CoxIter is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with CoxIter. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
32 #ifndef ARITHMETICITY_H
33 #define ARITHMETICITY_H
34 
35 #include "coxiter.h"
36 
38 private:
39  string error;
40 
42  unsigned int verticesCount;
43  vector<vector<unsigned int>> coxeterMatrix;
44  vector<unsigned int> referencesToLabels;
46 
47  // For the DFS
48  vector<vector<bool>> visitedEdges;
49  vector<bool> visitedVertices;
50  vector<unsigned int> path;
51 
54 
55  bool listCycles;
56  vector<string> allCycles;
57 
58 public:
62  Arithmeticity();
63 
68 
77  void test(CoxIter &ci, const bool &listCycles_);
78 
84  vector<string> get_allCycles();
85 
91  string get_error();
92 
93 private:
99  unsigned int collapseQueues();
100 
104  void testCycles();
105 
115  void findCycles(const unsigned int &root, const unsigned int &from);
116 
123  void testCycle();
124 };
125 
126 struct CycleElement {
127  unsigned int first;
128  unsigned int second;
129 };
130 
131 struct Cycles {};
132 
133 #endif // ARITHMETICITY_H
This class tests the arithmeticity of a graph which has no dotted edge and which is non-cocompact....
Definition: arithmeticity.h:37
vector< unsigned int > path
Current path.
Definition: arithmeticity.h:50
CoxIter * ci
Pointer to the CoxIter object.
Definition: arithmeticity.h:41
void findCycles(const unsigned int &root, const unsigned int &from)
Look for cycles.
Definition: arithmeticity.cpp:219
void test(CoxIter &ci, const bool &listCycles_)
Test the arithmeticity of a graph.
Definition: arithmeticity.cpp:30
vector< vector< bool > > visitedEdges
Traversed edges.
Definition: arithmeticity.h:48
vector< vector< unsigned int > > coxeterMatrix
Coxeter matrix of the group.
Definition: arithmeticity.h:43
void testCycles()
Test the cycles.
Definition: arithmeticity.cpp:199
vector< string > get_allCycles()
Return the list of cycles.
Definition: arithmeticity.cpp:352
bool notArithmetic
Definition: arithmeticity.h:52
unsigned int verticesCount
Number of generators of the group.
Definition: arithmeticity.h:42
bool listCycles
If true, will list the cycles to be manually tested.
Definition: arithmeticity.h:55
~Arithmeticity()
Destructor.
Definition: arithmeticity.cpp:28
vector< string > allCycles
The list.
Definition: arithmeticity.h:56
unsigned int collapseQueues()
Try to collapse queues of the graph.
Definition: arithmeticity.cpp:110
vector< unsigned int > referencesToLabels
Definition: arithmeticity.h:44
void testCycle()
Test the cycle in path.
Definition: arithmeticity.cpp:260
string error
If an error occured, small text.
Definition: arithmeticity.h:39
string get_error()
Return the error code.
Definition: arithmeticity.cpp:354
Arithmeticity()
Basic constructor.
Definition: arithmeticity.cpp:25
vector< bool > visitedVertices
Taversed vertices.
Definition: arithmeticity.h:49
Main class for the work.
Definition: coxiter.h:74
Definition: arithmeticity.h:126
unsigned int second
Definition: arithmeticity.h:128
unsigned int first
Definition: arithmeticity.h:127
Definition: arithmeticity.h:131