29 "Generate a random monomial ideal.",
30 "Generate a monomial ideal. The default is to generate a random one,\n"
31 "and in certain rare cases the generated ideal may have less than the "
33 "number of minimial generators. This can be alleviated by increasing the\n"
34 "exponent range or the number of variables.\n\n"
35 "The other types of ideals are not random, and they use the number of "
37 "as a parameter and may thus have more generators, depending on the type.",
42 "The supported types of ideals are random, edge, list, king, knight, rook, matching and tree.",
44 _variableCount(
"varCount",
"The number of variables.", 3),
45 _generatorCount(
"genCount",
"The number of minimal generators.", 5),
48 "Exponents are chosen uniformly in the range [0,INTEGER].", 9),
60 parameters.push_back(&
_type);
69 const string& type =
_type;
75 else if (type ==
"list")
77 else if (type ==
"edge")
79 else if (type ==
"king")
81 else if (type ==
"knight")
83 else if (type ==
"rook")
85 else if (type ==
"matching")
87 else if (type ==
"tree")
90 reportError(
"Unknown ideal type \"" + type +
"\".");
95 ioFacade.
writeIdeal(ideal, output.get(), stdout);
void generateMatchingIdeal(BigIdeal &ideal, unsigned int n)
virtual void obtainParameters(vector< Parameter * > ¶meters)
void generateKingChessIdeal(BigIdeal &ideal, unsigned int rowsAndColumns)
void generateTreeIdeal(BigIdeal &ideal, unsigned int varCount)
BoolParameter _printActions
void generateEdgeIdeal(BigIdeal &ideal, size_t varCount, size_t generatorCount)
void generateRookChessIdeal(BigIdeal &ideal, unsigned int n, unsigned int k)
void writeIdeal(const BigIdeal &ideal, IOHandler *handler, FILE *out)
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
void generateKnightChessIdeal(BigIdeal &ideal, unsigned int rowsAndColumns)
void validateFormats() const
void generateIdeal(BigIdeal &ideal, size_t exponentRange, size_t varCount, size_t generatorCount)
auto_ptr< IOHandler > createOutputHandler() const
void obtainParameters(vector< Parameter * > ¶meters)
IntegerParameter _variableCount
static const char * staticGetName()
void generateListIdeal(BigIdeal &ideal, size_t varCount)
virtual void obtainParameters(vector< Parameter * > ¶meters)
A facade for input and output of mathematical objects.
IntegerParameter _exponentRange
IntegerParameter _generatorCount
void reportError(const string &errorMsg)
A facade for random and other kinds of data.