Frobby  0.9.5
IdealFacade.h
Go to the documentation of this file.
1 /* Frobby: Software for monomial ideal computations.
2  Copyright (C) 2007 Bjarke Hammersholt Roune (www.broune.com)
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see http://www.gnu.org/licenses/.
16 */
17 #ifndef IDEAL_FACADE_GUARD
18 #define IDEAL_FACADE_GUARD
19 
20 #include "Facade.h"
21 #include "BigattiPivotStrategy.h"
22 
23 #include <vector>
24 
25 class VarNames;
26 class BigIdeal;
27 class IOHandler;
28 
34 class IdealFacade : private Facade {
35  public:
36  IdealFacade(bool printActions);
37 
39  void deform(BigIdeal& ideal);
40 
43  void takeRadical(BigIdeal& ideal);
44 
46  void swap01(BigIdeal& ideal);
47 
57  mpz_class computeDimension(const BigIdeal& ideal,
58  bool codimension = false,
59  bool squareFreeAndMinimal = false);
60 
64  void takeProducts(const vector<BigIdeal*>& ideals, BigIdeal& ideal);
65 
67  void sortAllAndMinimize(BigIdeal& bigIdeal);
68 
71  void projectVar(BigIdeal& bigIdeal, size_t var);
72 
74  void trimVariables(const vector<BigIdeal*>& ideals, VarNames& names);
75 
79  void addPurePowers(BigIdeal& bigIdeal);
80 
82  void sortGeneratorsUnique(BigIdeal& ideal);
83 
85  void sortGenerators(BigIdeal& ideal);
86 
88  void sortVariables(BigIdeal& ideal);
89 
91  void printAnalysis(FILE* out, BigIdeal& ideal);
92 
94  void printLcm(BigIdeal& ideal, IOHandler* handler, FILE* out);
95 };
96 
97 #endif
This is the super class of all facades.
Definition: Facade.h:32
An IOHandler implements input and output for some format in such a way that client code does not need...
Definition: IOHandler.h:41
A facade for performing operations on BigIdeal.
Definition: IdealFacade.h:34
void sortAllAndMinimize(BigIdeal &bigIdeal)
Remove redundant generators from ideal.
void trimVariables(const vector< BigIdeal * > &ideals, VarNames &names)
Remove those variables that do not appear in any generator.
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...
void swap01(BigIdeal &ideal)
Change all 0 exponents to 1 and vice versa.
Definition: IdealFacade.cpp:65
void sortGenerators(BigIdeal &ideal)
Sorts the generators of ideal.
mpz_class computeDimension(const BigIdeal &ideal, bool codimension=false, bool squareFreeAndMinimal=false)
Compute the Krull dimension of ideal.
Definition: IdealFacade.cpp:82
void deform(BigIdeal &ideal)
Applies some generic deformation to the ideal.
Definition: IdealFacade.cpp:37
void takeRadical(BigIdeal &ideal)
Takes the radical of the generators of ideal.
Definition: IdealFacade.cpp:51
void printAnalysis(FILE *out, BigIdeal &ideal)
IdealFacade(bool printActions)
Definition: IdealFacade.cpp:33
void sortVariables(BigIdeal &ideal)
Sorts the variables of ideal.
void projectVar(BigIdeal &bigIdeal, size_t var)
Remove the variable var from the ideal and ring by substituting it by 1.
void sortGeneratorsUnique(BigIdeal &ideal)
Sorts the generators of ideal and removes duplicates.
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 printLcm(BigIdeal &ideal, IOHandler *handler, FILE *out)
Defines the variables of a polynomial ring and facilities IO involving them.
Definition: VarNames.h:40
void codimension(const Ideal &ideal, mpz_t codim)
Compute the codimension of a monomial ideal.
Definition: frobby.cpp:441