Frobby  0.9.5
SliceFacade.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 SLICE_FACADE_GUARD
18 #define SLICE_FACADE_GUARD
19 
20 #include "SplitStrategy.h"
21 #include "Ideal.h"
22 #include "Facade.h"
23 #include "SliceParams.h"
24 #include "TermConsumer.h"
25 #include "CoefTermConsumer.h"
26 #include "CommonParamsHelper.h"
27 
28 #include <vector>
29 #include <cstdio>
30 #include <string>
31 
32 class BigIdeal;
33 class BigTermConsumer;
35 class SliceStrategy;
36 class IOHandler;
37 class DataType;
38 
44 class SliceFacade : public Facade {
45  public:
46  SliceFacade(const SliceParams& params, const DataType& output);
47  SliceFacade(const SliceParams& params,
48  const BigIdeal& ideal,
49  BigTermConsumer& consumer);
50  SliceFacade(const SliceParams& params,
51  const BigIdeal& ideal,
52  CoefBigTermConsumer& consumer);
53 
54  ~SliceFacade();
55 
67 
80 
97  void computeIrreducibleDecomposition(bool encode);
98 
104  mpz_class computeDimension(bool codimension = false);
105 
114  void computeDimension(mpz_class& dimension);
115 
127 
137 
145 
155  void computeAlexanderDual(const vector<mpz_class>& point);
156 
163  void computeAlexanderDual();
164 
173 
187  (const vector<mpz_class>& grading,
188  mpz_class& value,
189  bool reportAllSolutions);
190 
204  (const vector<mpz_class>& grading,
205  mpz_class& optimalValue,
206  bool reportAllSolutions);
207 
208  private:
209  void produceEncodedIrrDecom(TermConsumer& consumer);
210 
211  bool solveProgram(const vector<mpz_class>& grading,
212  mpz_class& optimalValue,
213  bool reportAllSolutions);
214 
215  bool isFirstComputation() const;
216 
217  void takeRadical();
218 
219  void getLcmOfIdeal(vector<mpz_class>& lcm);
220 
222 
225  auto_ptr<SplitStrategy> _split;
226 };
227 
228 #endif
Utility class for dealing with the contents of CommonParams.
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
Definition: DataType.h:29
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 operations on monomial ideals using the Slice Algorithm.
Definition: SliceFacade.h:44
void takeRadical()
void computeAssociatedPrimes()
Compute the associated primes of the ideal.
void runSliceAlgorithmWithOptions(SliceStrategy &strategy)
void computeMultigradedHilbertSeries()
Compute the numerator of the multigraded Hilbert-Poincare series.
Definition: SliceFacade.cpp:78
bool solveStandardProgram(const vector< mpz_class > &grading, mpz_class &value, bool reportAllSolutions)
Solve an optimization program over maximal standard monomials.
bool solveIrreducibleDecompositionProgram(const vector< mpz_class > &grading, mpz_class &optimalValue, bool reportAllSolutions)
Solve an optimization program over irreducible components.
bool isFirstComputation() const
CommonParamsHelper _common
Definition: SliceFacade.h:224
void getLcmOfIdeal(vector< mpz_class > &lcm)
void computeDimension(mpz_class &dimension)
Compute the dimension of ideal.
mpz_class computeDimension(bool codimension=false)
Compute the Krull dimension of ideal.
SliceFacade(const SliceParams &params, const DataType &output)
Definition: SliceFacade.cpp:50
void computeUnivariateHilbertSeries()
Compute the numerator of the univariate Hilbert-Poincare series.
Definition: SliceFacade.cpp:93
SliceParams _params
Definition: SliceFacade.h:223
auto_ptr< SplitStrategy > _split
Definition: SliceFacade.h:225
void computePrimaryDecomposition()
Compute the unique "nicest" primary decomposition of the ideal.
bool solveProgram(const vector< mpz_class > &grading, mpz_class &optimalValue, bool reportAllSolutions)
void computeIrreducibleDecomposition(bool encode)
Compute the unique irredundant set of irreducible ideals whose intersection equals ideal.
void computeMaximalStaircaseMonomials()
Compute the maximal staircase monomials of the ideal.
void computeMaximalStandardMonomials()
Compute the maximal standard monomials of the ideal.
void produceEncodedIrrDecom(TermConsumer &consumer)
void computeAlexanderDual()
Compute the Alexander dual of the ideal.
This class describes the interface of a strategy object for the Slice Algorithm.
Definition: SliceStrategy.h:33
This class is used to transfer terms one at a time from one part of the program to another,...
Definition: TermConsumer.h:36
void dimension(const Ideal &ideal, mpz_t dim)
Compute the Krull dimension of a monomial ideal.
Definition: frobby.cpp:447
void codimension(const Ideal &ideal, mpz_t codim)
Compute the codimension of a monomial ideal.
Definition: frobby.cpp:441
void lcm(Word *res, const Word *resEnd, const Word *a, const Word *b)