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
32class BigIdeal;
33class BigTermConsumer;
35class SliceStrategy;
36class IOHandler;
37class DataType;
38
44class 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
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
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.
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
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)
void computeUnivariateHilbertSeries()
Compute the numerator of the univariate Hilbert-Poincare series.
SliceParams _params
auto_ptr< SplitStrategy > _split
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.
This class is used to transfer terms one at a time from one part of the program to another,...