35 #define __COXITER_H__ 1
41 #ifndef _COMPILE_WITHOUT_REGEXP_
55 #include <unordered_set>
58 #ifdef _USE_LOCAL_GMP_
126 map<string, unsigned int>
133 map<unsigned int, string>
137 vector<short unsigned int>
path;
186 vector<map<vector<vector<short unsigned int>>,
unsigned int>>
188 vector<map<vector<vector<short unsigned int>>,
unsigned int>>
233 CoxIter(
const vector<vector<unsigned int>> &iMatrix,
234 const unsigned int &dimension);
251 bool bRunAllComputations();
299 #ifndef _COMPILE_WITHOUT_REGEXP_
326 #ifndef _COMPILE_WITHOUT_REGEXP_
327 bool parseGraph(istream &streamIn);
416 vector<map<vector<vector<short unsigned int>>,
unsigned int>>
417 *graphsProductsCount);
570 const unsigned int &j)
const;
708 vector<mpz_class> &polynomialDenominator,
783 void DFS(
unsigned int root,
unsigned int from);
808 const vector<bool> &verticesLinkable);
821 const vector<bool> &linkableVertices,
822 const bool &isSpherical,
823 const short unsigned int &iStart);
836 vector<short unsigned int> pathTemp,
837 const short unsigned int &endVertex);
854 vector<map<vector<vector<short unsigned int>>,
unsigned int>>
855 *graphsProductsCount,
857 vector<bool> &gpNonLinkableVertices);
873 vector<bool> &gpNonLinkableVertices);
877 vector<bool> &gpNonLinkableVertices);
880 vector<bool> &gpNonLinkableVertices);
892 const unsigned int &dataSupp);
921 const vector<vector<short unsigned int>> &product,
922 vector<unsigned int> &symbol,
unsigned int &exponent)
const;
935 const vector<vector<short unsigned int>> &product,
string &symbol,
936 unsigned int &exponent)
const;
964 vector<unsigned int> &symbol,
965 vector<mpz_class> tempPolynomial,
966 const vector<unsigned int> &tempSymbol,
967 mpz_class biTemp = 1);
974 const unsigned int &j,
975 const unsigned int &n) {
976 return (i * (2 * n - 1 - i) / 2 + j);
980 const unsigned int &n) {
981 return ((2 * n + 1 -
sqrtSup((2 * n + 1) * (2 * n + 1) - 8 * k)) / 2);
985 const unsigned int &n) {
987 return (k - (row * (2 * n - 1 - row)) / 2);
Main class for the work.
Definition: coxiter.h:74
void printGramMatrix_LaTeX()
Print the Gram matrix (format: LaTeX)
unsigned int get_irreducibleSphericalGraphsCount() const
Return the number of irreducible spherical graphs.
GraphsList * graphsList_spherical
Pointer to the list of spherical graphs.
Definition: coxiter.h:142
void AnToEn_AnToTEn(const vector< short unsigned int > &pathTemp, const vector< bool > &verticesLinkable)
string eulerCharacteristic_computations
Definition: coxiter.h:197
int get_fVectorAlternateSum() const
Return the alternating sum of the componenents of the f-vector.
void canBeFiniteCovolume_complete_computeGraphsProducts(GraphsListIterator grIt, GraphsProduct &gp, vector< bool > &gpNonLinkableVertices)
vector< map< vector< vector< short unsigned int > >, unsigned int > > graphsProductsCount_euclidean
Count graphs products (with their multiplicities)
Definition: coxiter.h:189
vector< mpz_class > get_growthSeries_denominator()
void growthSeries_mergeTerms(vector< mpz_class > &polynomial, vector< unsigned int > &symbol, vector< mpz_class > tempPolynomial, const vector< unsigned int > &tempSymbol, mpz_class biTemp=1)
void printGramMatrix_PARI()
Print the Gram matrix (format: PARI)
void printCoxeterGraph()
Print Coxeter graph.
void AnToEn_AnToTEn(const vector< short unsigned int > &pathTemp, const vector< bool > &linkableVertices, const bool &isSpherical, const short unsigned int &iStart)
vector< vector< GraphsProductSet > > graphsProducts_canBeFiniteCovolume
Definition: coxiter.h:172
vector< string > vertices
Vertices to be taken.
Definition: coxiter.h:124
vector< vector< short unsigned int > > canBeFiniteCovolume_complete()
Check whether the group can be of finite covolume or no.
bool canBeFiniteCovolume()
Check whether the group can be of finite covolume or no Remark: If true, it does not mean that the gr...
bool get_hasSphericalGraphsOfRank(const unsigned int &rank) const
GraphsList * get_gl_graphsList_spherical() const
void printCoxeterMatrix()
Print Coxeter matrix.
void growthSeries_symbolExponentFromProduct(const vector< vector< short unsigned int >> &product, vector< unsigned int > &symbol, unsigned int &exponent) const
string gramMatrixField
Field generated by the entries of the Gram matrix.
Definition: coxiter.h:139
map< unsigned int, string > get_weights() const
Return the weights of the dotted lines.
int get_isCocompact()
Return the value of isCompact.
void growthSeries_symbolExponentFromProduct(const vector< vector< short unsigned int >> &product, string &symbol, unsigned int &exponent) const
string get_gramMatrix_GAP() const
Returns the Gram matrix (format GAP)
void computeGraphsProducts_IS(GraphsListIterator grIt, const bool &isSpherical, GraphsProduct &gp, vector< bool > &gpNonLinkableVertices)
const vector< vector< GraphsProductSet > > * get_ptr_graphsProducts() const
Return the list of graphs products Remark: there is absolutely no verification.
void growthSeries_details()
vector< vector< bool > > visitedEdges
For the DFS: traversed edges.
Definition: coxiter.h:135
bool readGraphFromFile(const string &inputFilename)
Read the graph from a file.
string error
Error code.
Definition: coxiter.h:76
bool bWriteInfo
Definition: coxiter.h:83
unsigned int sphericalMaxRankFound
Maximal rank for a spherical graph.
Definition: coxiter.h:101
vector< unsigned int > infSeqFVectorsUnits
(ultra)parallel hyperplane, will be conjugate
Definition: coxiter.h:148
bool get_hasDottedLine() const
Does the graph have at least one dotted edge?
string get_vertexLabel(const unsigned int &vertex) const
Get the label of a vertex.
unsigned int get_verticesCount() const
Retourne le nombre de sommets du graphe.
string get_gramMatrix_LaTeX() const
Returns the Gram matrix (format LaTeX)
bool isDimensionGuessed
If the dimension was not specified but guessed.
Definition: coxiter.h:103
string get_gramMatrix_Mathematica() const
Returns the Gram matrix (format Mathematica)
streambuf * sBufOld
To reset the cout, at the end.
Definition: coxiter.h:90
vector< unsigned int > infSeqFVectorsPowers
Components of the f-vector.
Definition: coxiter.h:149
void set_dimension(const unsigned int &dimension_)
Update the member dimension.
vector< vector< unsigned int > > coxeterMatrix
Coxeter matrix.
Definition: coxiter.h:132
friend ostream & operator<<(ostream &, CoxIter const &)
bool writeGraph(const string &filename)
Write the graph in a file (so that it can be read by CoxIter)
int checkCovolumeFiniteness()
unsigned int infSeq_t0
First reflecting hyperplane.
Definition: coxiter.h:146
vector< map< vector< vector< short unsigned int > >, unsigned int > > graphsProductsCount_spherical
Definition: coxiter.h:187
void set_checkCocompactness(const bool &value)
bool get_dimensionGuessed() const
Return true if the dimension was guessed.
void printPath()
Print the path vector.
bool isGrowthSeriesComputed
True if we computed the growth series.
Definition: coxiter.h:108
void growthSeries_parallel()
vector< vector< string > > get_array_str_2_GramMatrix() const
Return the entries of 2*G (string)
string get_gramMatrix() const
Returns the Gram matrix.
vector< unsigned int > growthSeries_cyclotomicNumerator
Definition: coxiter.h:209
map< unsigned int, string > weightsDotted
Weights of the dotted lines (via linearization)
Definition: coxiter.h:134
vector< vector< unsigned int > > get_coxeterMatrix() const
Return the Coxeter matrix.
unsigned int get_dimension() const
Return the dimension.
int fVectorAlternateSum
Alternating sum of the components of thef-vector.
Definition: coxiter.h:200
void set_verticesToRemove(const vector< string > &verticesRemove_)
bool writeGraphToDraw(const string &outFilenameBasis)
Write the graph in a file for GraphViz.
int isFiniteCovolume
Check whether the graph is of finite covolume or not Remark: If the programm was not called with the ...
Definition: coxiter.h:120
vector< string > verticesToRemove
Vertices to be removed.
Definition: coxiter.h:123
bool growthSeries_isFractionReduced
Definition: coxiter.h:211
int get_isArithmetic() const
Arithmetic?
void IS_computations(const string &t0, const string &s0)
string get_coxeterGraph() const
Returns the Coxeter graph.
vector< short unsigned int > path
chemin en cours (pour le DFS)
Definition: coxiter.h:137
unsigned int get_vertexIndex(const string &vertexLabel) const
Get the index of a vertex.
vector< unsigned int > get_fVector() const
Return the f-vector.
bool debug
If true, prints additionnal information.
Definition: coxiter.h:77
string get_error() const
Retourne le code d'erreur.
void printGramMatrix_GAP()
Print the Gram matrix (format: GAP)
unsigned int verticesAtInfinityCount
Number of vertices at infinity.
Definition: coxiter.h:202
GraphsList * get_gl_graphsList_euclidean() const
int isArithmetic
1 If arithmetic, 0 if non-arithmetic, -1 if don't know
Definition: coxiter.h:119
void addGraphsFromPath()
Find the different type of graphs (An, Bn, Dn, En, Hn, F4) from any An.
unsigned int dimension
Dimension (or 0)
Definition: coxiter.h:100
void get_growthSeries(vector< unsigned int > &cyclotomicNumerator, vector< mpz_class > &polynomialDenominator, bool &isReduced)
vector< unsigned int > get_infSeqFVectorsPowers() const
GraphsList * graphsList_euclidean
Pointer to the list of euclidean graphs.
Definition: coxiter.h:143
string get_gramMatrix_PARI() const
Returns the Gram matrix (format PARI)
void growthSeries_sequential()
MPZ_rational brEulerCaracteristic
Euler characteristic.
Definition: coxiter.h:196
mpz_class i_orderFiniteSubgraph(const unsigned int &type, const unsigned int &dataSupp)
Order of a connected spherical graph.
bool hasDottedLine
True if the graph has a dotted line.
Definition: coxiter.h:110
bool computeEulerCharacteristicFVector()
Conmpute the euler characteristic and f-vector.
void set_bWriteInfo(const bool &newValue)
Set bWriteInfo.
vector< mpz_class > growthSeries_polynomialDenominator
Definition: coxiter.h:205
void computeGraphsProducts(GraphsListIterator grIt, vector< map< vector< vector< short unsigned int >>, unsigned int >> *graphsProductsCount, const bool &isSpherical, GraphsProduct &gp, vector< bool > &gpNonLinkableVertices)
vector< unsigned int > fVector
F-vector.
Definition: coxiter.h:201
void set_ouputMathematicalFormat(const string &format)
bool isVertexValid(const string &vertexLabel) const
Test if a vertex exists in the graph.
map< string, unsigned int > map_vertices_labelToIndex
Definition: coxiter.h:127
int get_hasDottedLineWithoutWeight() const
Does the graph have dotted edges without weights?
void initializations()
Une fois le nombre de sommets du graphe connu (via inputRead()), fait divers initialisations de varia...
vector< mpz_class > factorials
Definition: coxiter.h:191
bool checkCocompactness
True if we want to check the cocompacity.
Definition: coxiter.h:114
void map_vertices_labels_reinitialize()
Create labels if there with int.
bool checkCofiniteness
Definition: coxiter.h:115
int isCocompact
Definition: coxiter.h:117
int isGraphCocompact()
Check whether the graph is cocompact or not Remark: If the programm was not called with the -compacit...
void map_vertices_labels_addReference(const string &label)
Add a references for a new vertex.
ofstream * outCout
Flow to the file.
Definition: coxiter.h:89
int get_isFiniteCovolume()
Return the value of isFiniteCovolume.
void map_vertices_labels_removeReference(const unsigned int &index)
Remove the references to a vertex (for the label)
void set_verticesToConsider(const vector< string > &verticesToConsider)
void set_useOpenMP(const bool &value)
unsigned int maximalSubgraphRank
Maximal rank of a subgraph.
Definition: coxiter.h:98
vector< mpz_class > powersOf2
Definition: coxiter.h:192
void printGrowthSeries()
Display the growth series.
bool isGramMatrixFieldKnown
True if the field was determined.
Definition: coxiter.h:140
vector< string > get_str_map_vertices_indexToLabel() const
Return the label of the vertices.
void printGramMatrix_Mathematica()
Print the Gram matrix (format: Mathematica)
bool bCoutFile
True if we want to redirect cout to a file.
Definition: coxiter.h:88
void set_coxeterMatrix(const vector< vector< unsigned int >> &matrix)
Set the Coxeter matrix.
vector< vector< GraphsProductSet > > graphsProducts
Definition: coxiter.h:162
int hasDottedLineWithoutWeight
Definition: coxiter.h:111
string get_eulerCaracteristicString() const
return Euler characteristic
string get_gramMatrixField() const
Field generated by the entries of the Gram matrix (string)
string get_growthSeries()
MPZ_rational get_brEulerCaracteristic() const
return brEulerCaracteristic
string get_eulerCharacteristic_computations() const
Return the computations needed to determine Euler's characteristic.
unsigned int get_verticesAtInfinityCount() const
Return the number of vertices at infinity.
void canBeFiniteCovolume_computeGraphsProducts(GraphsListIterator grIt, GraphsProduct &gp, vector< bool > &gpNonLinkableVertices)
string growthSeries_raw
Row series, not simplified.
Definition: coxiter.h:217
unsigned int infSeq_s0
Definition: coxiter.h:147
vector< bool > visitedVertices
For the DFS: traversed vertices.
Definition: coxiter.h:136
void printEdgesVisitedMatrix()
Display the visited edges.
void DFS(unsigned int root, unsigned int from)
Look for all the An starting from a given vertex.
unsigned int verticesCount
Number of vertices.
Definition: coxiter.h:97
void computeGraphsProducts()
Compute the possible products of the irreducible graphs.
vector< string > map_vertices_indexToLabel
Definition: coxiter.h:129
void set_outputFilename(const string &filename)
vector< unsigned int > get_infSeqFVectorsUnits() const
Return the units of the f-vector after n-doubling.
bool useOpenMP
Use OpenMP.
Definition: coxiter.h:79
bool isGraphExplored
Definition: coxiter.h:105
void set_sdtOutToFile(const string &filename)
void printEuclideanGraphsProducts(vector< map< vector< vector< short unsigned int >>, unsigned int >> *graphsProductsCount)
Display the euclidean graph products found.
string get_growthSeries_raw()
void set_checkCofiniteness(const bool &value)
string get_CoxeterMatrixString() const
Return the Coxeter matrix as a string.
bool isGraphsProductsComputed
True if we computed the graphs products.
Definition: coxiter.h:107
void map_vertices_labels_create()
Create labels if there is none (int --> string)
bool get_bWriteInfo() const
Return bWriteInfo.
unsigned int get_coxeterMatrixEntry(const unsigned int &i, const unsigned int &j) const
Return the one entry of the Coxeter matrix.
void set_debug(const bool &value)
bool hasBoldLine
True if the graph has a bold line.
Definition: coxiter.h:113
bool isGraph_cocompact_finiteVolume_sequential(unsigned int index)
Check whether the graph is cocompact or not or has finite covolume or not Called by: isGraphCocompact...
unsigned int euclideanMaxRankFound
Maximal rank for an euclidean graph.
Definition: coxiter.h:102
bool get_debug() const
Return get_debug.
bool isGraph_cocompact_finiteVolume_parallel(unsigned int index)
Check whether the graph is cocompact or not or has finite covolume or not Called by: isGraphCocompact...
bool get_isGrowthSeriesReduced()
Return true if the fraction is reduced.
void B3ToF4_B4ToTF4(const vector< bool > &linkableVerticesStart, vector< short unsigned int > pathTemp, const short unsigned int &endVertex)
Essaie de construire un F4 depuis un B3.
bool get_hasEuclideanGraphsOfRank(const unsigned int &rank) const
void set_isArithmetic(const unsigned int &arithmetic)
Update the member isArithmetic.
CoxIter(const CoxIter &)
We do not want to do this.
void printGramMatrix()
Print the Gram matrix.
string ouputMathematicalFormat
Definition: coxiter.h:92
Liste des graphes.
Definition: graphs.list.h:40
Permet de parcourir une liste de graphes Utilisation (pour un GraphsList *gl) GraphsListIterator ite...
Definition: graphs.list.iterator.h:43
: Un produit de graphs
Definition: graphs.product.h:47
Definition: mpz_rational.h:49
unsigned int omp_get_max_threads()
Definition: coxiter.h:68
unsigned int linearizationMatrix_row(const unsigned int &k, const unsigned int &n)
Definition: coxiter.h:979
unsigned int linearizationMatrix_col(const unsigned int &k, const unsigned int &n)
Definition: coxiter.h:984
unsigned int omp_get_thread_num()
Definition: coxiter.h:67
unsigned int linearizationMatrix_index(const unsigned int &i, const unsigned int &j, const unsigned int &n)
Definition: coxiter.h:973
Some mathematical functions regarding polynomials.
To simplify the use of regexp.