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);
BoolParameter _printActions
virtual void obtainParameters(vector< Parameter * > ¶meters)
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
A facade for random and other kinds of data.
void generateIdeal(BigIdeal &ideal, size_t exponentRange, size_t varCount, size_t generatorCount)
void generateKingChessIdeal(BigIdeal &ideal, unsigned int rowsAndColumns)
void generateTreeIdeal(BigIdeal &ideal, unsigned int varCount)
void generateEdgeIdeal(BigIdeal &ideal, size_t varCount, size_t generatorCount)
void generateKnightChessIdeal(BigIdeal &ideal, unsigned int rowsAndColumns)
void generateRookChessIdeal(BigIdeal &ideal, unsigned int n, unsigned int k)
void generateMatchingIdeal(BigIdeal &ideal, unsigned int n)
void generateListIdeal(BigIdeal &ideal, size_t varCount)
static const char * staticGetName()
IntegerParameter _exponentRange
virtual void obtainParameters(vector< Parameter * > ¶meters)
IntegerParameter _generatorCount
IntegerParameter _variableCount
A facade for input and output of mathematical objects.
void writeIdeal(const BigIdeal &ideal, IOHandler *handler, FILE *out)
auto_ptr< IOHandler > createOutputHandler() const
void validateFormats() const
void obtainParameters(vector< Parameter * > ¶meters)
void reportError(const string &errorMsg)