SliceFacade.h
Go to the documentation of this file.
/* Frobby: Software for monomial ideal computations.
Copyright (C) 2007 Bjarke Hammersholt Roune (www.broune.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
*/
#ifndef SLICE_FACADE_GUARD
#define SLICE_FACADE_GUARD
#include "SplitStrategy.h"
#include "Ideal.h"
#include "Facade.h"
#include "SliceParams.h"
#include "TermConsumer.h"
#include "CoefTermConsumer.h"
#include "CommonParamsHelper.h"
#include <vector>
#include <cstdio>
#include <string>
class BigIdeal;
class BigTermConsumer;
class CoefBigTermConsumer;
class SliceStrategy;
class IOHandler;
class DataType;
class SliceFacade : public Facade {
public:
SliceFacade(const SliceParams& params, const DataType& output);
SliceFacade(const SliceParams& params,
const BigIdeal& ideal,
BigTermConsumer& consumer);
SliceFacade(const SliceParams& params,
const BigIdeal& ideal,
CoefBigTermConsumer& consumer);
~SliceFacade();
void computeMultigradedHilbertSeries();
void computeUnivariateHilbertSeries();
void computeIrreducibleDecomposition(bool encode);
mpz_class computeDimension(bool codimension = false);
void computeDimension(mpz_class& dimension);
void computePrimaryDecomposition();
void computeMaximalStaircaseMonomials();
void computeMaximalStandardMonomials();
void computeAlexanderDual(const vector<mpz_class>& point);
void computeAlexanderDual();
void computeAssociatedPrimes();
bool solveStandardProgram
(const vector<mpz_class>& grading,
mpz_class& value,
bool reportAllSolutions);
bool solveIrreducibleDecompositionProgram
(const vector<mpz_class>& grading,
mpz_class& optimalValue,
bool reportAllSolutions);
private:
void produceEncodedIrrDecom(TermConsumer& consumer);
bool solveProgram(const vector<mpz_class>& grading,
mpz_class& optimalValue,
bool reportAllSolutions);
bool isFirstComputation() const;
void takeRadical();
void getLcmOfIdeal(vector<mpz_class>& lcm);
void runSliceAlgorithmWithOptions(SliceStrategy& strategy);
SliceParams _params;
CommonParamsHelper _common;
unique_ptr<SplitStrategy> _split;
};
#endif
CoefTermConsumer.h
CommonParamsHelper.h
Facade.h
Ideal.h
SliceParams.h
SplitStrategy.h
TermConsumer.h
BigIdeal
Definition BigIdeal.h:27
BigTermConsumer
Definition BigTermConsumer.h:29
CoefBigTermConsumer
Definition CoefBigTermConsumer.h:29
CommonParamsHelper
Utility class for dealing with the contents of CommonParams.
Definition CommonParamsHelper.h:38
DataType
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
Definition DataType.h:29
Facade::Facade
Facade(bool printActions)
Constructs a facade that prints out what it is doing if printActions is true.
Definition Facade.cpp:20
IOHandler
An IOHandler implements input and output for some format in such a way that client code does not need...
Definition IOHandler.h:41
SliceFacade::_split
unique_ptr< SplitStrategy > _split
Definition SliceFacade.h:225
SliceFacade::~SliceFacade
~SliceFacade()
Definition SliceFacade.cpp:75
SliceFacade::takeRadical
void takeRadical()
Definition SliceFacade.cpp:433
SliceFacade::computeAssociatedPrimes
void computeAssociatedPrimes()
Compute the associated primes of the ideal.
Definition SliceFacade.cpp:286
SliceFacade::runSliceAlgorithmWithOptions
void runSliceAlgorithmWithOptions(SliceStrategy &strategy)
Definition SliceFacade.cpp:467
SliceFacade::computeMultigradedHilbertSeries
void computeMultigradedHilbertSeries()
Compute the numerator of the multigraded Hilbert-Poincare series.
Definition SliceFacade.cpp:78
SliceFacade::solveStandardProgram
bool solveStandardProgram(const vector< mpz_class > &grading, mpz_class &value, bool reportAllSolutions)
Solve an optimization program over maximal standard monomials.
Definition SliceFacade.cpp:352
SliceFacade::solveIrreducibleDecompositionProgram
bool solveIrreducibleDecompositionProgram(const vector< mpz_class > &grading, mpz_class &optimalValue, bool reportAllSolutions)
Solve an optimization program over irreducible components.
Definition SliceFacade.cpp:337
SliceFacade::isFirstComputation
bool isFirstComputation() const
Definition SliceFacade.cpp:429
SliceFacade::_common
CommonParamsHelper _common
Definition SliceFacade.h:224
SliceFacade::getLcmOfIdeal
void getLcmOfIdeal(vector< mpz_class > &lcm)
Definition SliceFacade.cpp:455
SliceFacade::computeDimension
void computeDimension(mpz_class &dimension)
Compute the dimension of ideal.
SliceFacade::computeDimension
mpz_class computeDimension(bool codimension=false)
Compute the Krull dimension of ideal.
Definition SliceFacade.cpp:114
SliceFacade::SliceFacade
SliceFacade(const SliceParams &params, const DataType &output)
Definition SliceFacade.cpp:50
SliceFacade::computeUnivariateHilbertSeries
void computeUnivariateHilbertSeries()
Compute the numerator of the univariate Hilbert-Poincare series.
Definition SliceFacade.cpp:93
SliceFacade::_params
SliceParams _params
Definition SliceFacade.h:223
SliceFacade::computePrimaryDecomposition
void computePrimaryDecomposition()
Compute the unique "nicest" primary decomposition of the ideal.
Definition SliceFacade.cpp:150
SliceFacade::solveProgram
bool solveProgram(const vector< mpz_class > &grading, mpz_class &optimalValue, bool reportAllSolutions)
Definition SliceFacade.cpp:375
SliceFacade::computeIrreducibleDecomposition
void computeIrreducibleDecomposition(bool encode)
Compute the unique irredundant set of irreducible ideals whose intersection equals ideal.
Definition SliceFacade.cpp:109
SliceFacade::computeMaximalStaircaseMonomials
void computeMaximalStaircaseMonomials()
Compute the maximal staircase monomials of the ideal.
Definition SliceFacade.cpp:229
SliceFacade::computeMaximalStandardMonomials
void computeMaximalStandardMonomials()
Compute the maximal standard monomials of the ideal.
Definition SliceFacade.cpp:241
SliceFacade::produceEncodedIrrDecom
void produceEncodedIrrDecom(TermConsumer &consumer)
Definition SliceFacade.cpp:362
SliceFacade::computeAlexanderDual
void computeAlexanderDual()
Compute the Alexander dual of the ideal.
Definition SliceFacade.cpp:275
SliceParams
Definition SliceParams.h:25
SliceStrategy
This class describes the interface of a strategy object for the Slice Algorithm.
Definition SliceStrategy.h:33
TermConsumer
This class is used to transfer terms one at a time from one part of the program to another,...
Definition TermConsumer.h:36