#include <Equation.h>
| Public Member Functions | |
| Equation (int nGen, int nVar, const Word &eq) | |
| bool | isGenerator (int g) const | 
| Determine if g is a letter in this equation. | |
| bool | isVariable (int g) const | 
| Determine if g is a variable in this equation. | |
| int | getTheNumberOfGenerators () const | 
| Get the number of the generators of the group. | |
| int | getTheNumberOfVariables () const | 
| Get the number of variables in the formula. | |
| const Word & | getTheEquation () const | 
| Get the word presentation of the equation. | |
| bool | isQuadratic () const | 
| Determine if the equation is quadratic. | |
| bool | trivialSolution () const | 
| Determine if the equation has trivial solution. | |
| Static Public Member Functions | |
| static Equation | randomQuadraticEquation (int nGen, int nVar, int len) | 
| Generate random (strictly) quadratic equation of length  with  generators,  variables. | |
| Private Attributes | |
| int | theNumberOfGenerators | 
| the number of the generators of the group | |
| int | theNumberOfVariables | 
| the number of variables in the formula (the actual number of variables in the equation can be lesser) | |
| Word | theEquation | 
| the presentation of the equation | |
| Friends | |
| ostream & | operator<< (ostream &os, const Equation &eq) | 
Definition at line 27 of file Equation.h.
| Equation::Equation | ( | int | nGen, | |
| int | nVar, | |||
| const Word & | eq | |||
| ) | 
| const Word& Equation::getTheEquation | ( | ) | const  [inline] | 
Get the word presentation of the equation.
Definition at line 66 of file Equation.h.
References theEquation.
| int Equation::getTheNumberOfGenerators | ( | ) | const  [inline] | 
Get the number of the generators of the group.
Definition at line 58 of file Equation.h.
References theNumberOfGenerators.
| int Equation::getTheNumberOfVariables | ( | ) | const  [inline] | 
Get the number of variables in the formula.
Definition at line 62 of file Equation.h.
References theNumberOfVariables.
| bool Equation::isGenerator | ( | int | g | ) | const | 
Determine if g is a letter in this equation.
| bool Equation::isQuadratic | ( | ) | const | 
Determine if the equation is quadratic.
| bool Equation::isVariable | ( | int | g | ) | const | 
Determine if g is a variable in this equation.
| static Equation Equation::randomQuadraticEquation | ( | int | nGen, | |
| int | nVar, | |||
| int | len | |||
| ) |  [static] | 
Generate random (strictly) quadratic equation of length  with
 with  generators,
 generators,  variables.
 variables. 
Routine "arranges" len generators and  variables (each variable twice) into a reduced equation. The distribution is not uniform among equations of this type (even though for large values of len I think it will be close to uniform). For uniform distribution one has to construct a FSA accepting all equations of this type, then assign weights to edges using dynamic programming, and finally choose words from that FSA accoring to the weights.
 variables (each variable twice) into a reduced equation. The distribution is not uniform among equations of this type (even though for large values of len I think it will be close to uniform). For uniform distribution one has to construct a FSA accepting all equations of this type, then assign weights to edges using dynamic programming, and finally choose words from that FSA accoring to the weights. 
| bool Equation::trivialSolution | ( | ) | const | 
Determine if the equation has trivial solution.
| ostream& operator<< | ( | ostream & | os, | |
| const Equation & | eq | |||
| ) |  [friend] | 
| Word Equation::theEquation  [private] | 
the presentation of the equation
A word theEquation is a sequence of generators. Each generator  is interpreted the following way:
 is interpreted the following way:
 then
 then  is the corresponding generator of the group
 is the corresponding generator of the group then
 then  is a variable with index
 is a variable with index  raised in the power
 raised in the power  depending on the sign of
 depending on the sign of  .
. Definition at line 126 of file Equation.h.
Referenced by getTheEquation().
| int Equation::theNumberOfGenerators  [private] | 
the number of the generators of the group
Definition at line 116 of file Equation.h.
Referenced by getTheNumberOfGenerators().
| int Equation::theNumberOfVariables  [private] | 
the number of variables in the formula (the actual number of variables in the equation can be lesser)
Definition at line 118 of file Equation.h.
Referenced by getTheNumberOfVariables().
 1.6.1
 1.6.1