Go to the documentation of this file.
33 "Change the representation of the input ideal.",
34 "By default, transform simply writes the input ideals to output. A "
35 "number of parameters allow one to transform the input ideal in various ways.",
42 "Sort variables, generators and ideals to get canonical representation.",
47 "Sort generators according to the reverse lexicographic order.",
52 "Remove duplicate generators.",
57 "Remove non-minimial generators.",
62 "Apply a generic deformation to the input ideal.",
67 "Take the radical of the generators. Combine this with -minimize to "
68 "get rid of any non-minimal ones.",
73 "Replace each ideal with the product of its generators.",
78 "Adds a pure power for each variable that does not already have a pure "
79 "power in the ideal. Each exponent is chosen to be one larger than the "
80 "maximal exponent of that variable that appears in the ideal.",
85 "Remove variables that divide none of the generators.",
90 "Exchange variables and minimal generators. Let M be a matrix whose "
91 "rows are labeled by minimal generators and whose columns are labeled "
92 "by variables. The entry at row g and column x is the number of times "
93 "that x divides g. This options transposes that matrix.",
98 "Change all 0 exponents to 1 and vice versa.",
103 "Project away the i'th variable counting from 1. No action is taken "
104 "for a value of 0 or more than the number of variables in the ring.",
112 parameters.push_back(&
_sort);
113 parameters.push_back(&
_unique);
114 parameters.push_back(&
_deform);
119 parameters.push_back(&
_swap01);
132 vector<BigIdeal*> ideals;
143 for (
size_t i = 0; i < ideals.size(); ++i) {
144 const BigIdeal& ideal = *(ideals[i]);
147 for (
size_t var = 0; var < ideal.
getVarCount(); ++var) {
152 (*ideals[i]) = trans;
153 if (i == ideals.size() - 1)
162 for (
size_t i = 0; i < ideals.size(); ++i) {
169 auto_ptr<BigIdeal> ideal;
178 for (
size_t i = 0; i < ideals.size(); ++i) {
185 idealFacade.
swap01(ideal);
191 idealFacade.
deform(ideal);
197 for (
size_t i = 0; i < ideals.size(); ++i) {
220 facade.
writeIdeals(ideals, names, output.get(), stdout);
vector< mpz_class > & getLastTermRef()
void expectEOF()
Require that there is no more input.
This class offers an input interface which is more convenient and for some purposes more efficient th...
void takeProducts(const vector< BigIdeal * > &ideals, BigIdeal &ideal)
Take the product of the minimal generators of each ideal, and add the resulting monomials as generato...
void readIdeals(Scanner &in, vector< BigIdeal * > &ideals, VarNames &names)
Insert the ideals that are read into the parameter ideals.
const VarNames & getNames() const
void validateFormats() const
void writeIdeals(const vector< BigIdeal * > &ideals, const VarNames &names, IOHandler *handler, FILE *out)
void projectVar(size_t index)
void sortGenerators(BigIdeal &ideal)
Sorts the generators of ideal.
void sortVariables(BigIdeal &ideal)
Sorts the variables of ideal.
void swap01(BigIdeal &ideal)
Change all 0 exponents to 1 and vice versa.
virtual void obtainParameters(vector< Parameter * > ¶meters)
size_t getVarCount() const
Returns the current number of variables.
void autoDetectInputFormat(Scanner &in)
If using the input format, this must be called before validating the ideals, since the auto detect fo...
void projectVar(BigIdeal &bigIdeal, size_t var)
Remove the variable var from the ideal and ring by substituting it by 1.
void reserve(size_t capacity)
void trimVariables(const vector< BigIdeal * > &ideals, VarNames &names)
Remove those variables that do not appear in any generator.
void sortAllAndMinimize(BigIdeal &bigIdeal)
Remove redundant generators from ideal.
void clear()
Resets the number of variables to zero.
void takeRadical(BigIdeal &ideal)
Takes the radical of the generators of ideal.
void exceptionSafePushBack(Container &container, auto_ptr< Element > pointer)
void sortGeneratorsUnique(BigIdeal &ideal)
Sorts the generators of ideal and removes duplicates.
A facade for performing operations on BigIdeal.
BoolParameter _printActions
const string & getInputFormat() const
Defines the variables of a polynomial ring and facilities IO involving them.
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
void addPurePowers(BigIdeal &bigIdeal)
Adds x_i^(l_i+1) to the ideal for each i where that will be a minimal generator, where x^l is the lcm...
auto_ptr< IOHandler > createOutputHandler() const
size_t getGeneratorCount() const
void getOrderedNames(VarNames &names)
size_t getVarCount() const
void deform(BigIdeal &ideal)
Applies some generic deformation to the ideal.
void obtainParameters(vector< Parameter * > ¶meters)
A facade for input and output of mathematical objects.