#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 ![]() ![]() ![]() | |
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.
|
|
|
Get the word presentation of the equation.
Definition at line 66 of file Equation.h. References theEquation. |
|
Get the number of the generators of the group.
Definition at line 58 of file Equation.h. References theNumberOfGenerators. |
|
Get the number of variables in the formula.
Definition at line 62 of file Equation.h. References theNumberOfVariables. |
|
Determine if g is a letter in this equation.
|
|
Determine if the equation is quadratic.
|
|
Determine if g is a variable in this equation.
|
|
Generate random (strictly) quadratic equation of length
Routine "arranges" len generators and |
|
Determine if the equation has trivial solution.
|
|
|
|
the presentation of the equation
A word theEquation is a sequence of generators. Each generator
Definition at line 126 of file Equation.h. Referenced by getTheEquation(). |
|
the number of the generators of the group
Definition at line 116 of file Equation.h. Referenced by getTheNumberOfGenerators(). |
|
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(). |