frobby.cpp
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/.
*/
#include "stdinc.h"
#include "frobby.h"
#include "BigIdeal.h"
#include "SliceFacade.h"
#include "BigTermConsumer.h"
#include "TermTranslator.h"
#include "Term.h"
#include "error.h"
#include "CoefBigTermConsumer.h"
#include "IdealFacade.h"
#include "SliceParams.h"
/* also increment the version number in:
- CMakeLists.txt
- doc/doxygen.conf
- doc/manual.tex
- test/messages/help-noparam.err
and update the library version as outlined in Makefile */
const char* const frobby_version = "0.9.9";
class ConsumerWrapper {
protected:
ConsumerWrapper(size_t varCount):
_varCount(varCount),
_term(new mpz_ptr[varCount]) {
}
virtual ~ConsumerWrapper() {
delete[] _term;
}
void setTerm(const Term& term, const TermTranslator& translator) {
ASSERT(term.getVarCount() == _varCount);
ASSERT(translator.getVarCount() == _varCount);
for (size_t var = 0; var < _varCount; ++var)
_term[var] = const_cast<mpz_ptr>
(translator.getExponent(var, term).get_mpz_t());
}
void setTerm(const vector<mpz_class>& term) {
ASSERT(term.size() == _varCount);
for (size_t var = 0; var < _varCount; ++var)
_term[var] = const_cast<mpz_ptr>(term[var].get_mpz_t());
}
size_t _varCount;
mpz_ptr* _term;
};
class ExternalIdealConsumerWrapper : public BigTermConsumer,
public ConsumerWrapper {
public:
ExternalIdealConsumerWrapper(Frobby::IdealConsumer* consumer,
size_t varCount):
ConsumerWrapper(varCount),
_consumer(consumer) {
ASSERT(_consumer != 0);
}
virtual void consumeRing(const VarNames& names) {
ASSERT(names.getVarCount() == _varCount);
}
virtual void beginConsuming() {
_consumer->idealBegin(_varCount);
}
virtual void consume(const Term& term, const TermTranslator& translator) {
ASSERT(term.getVarCount() == _varCount);
ASSERT(translator.getVarCount() == _varCount);
setTerm(term, translator);
_consumer->consume(_term);
}
virtual void consume(const vector<mpz_class>& term) {
ASSERT(term.size() == _varCount);
setTerm(term);
_consumer->consume(_term);
}
virtual void doneConsuming() {
_consumer->idealEnd();
}
private:
Frobby::IdealConsumer* _consumer;
};
class ExternalPolynomialConsumerWrapper : public CoefBigTermConsumer,
public ConsumerWrapper {
public:
ExternalPolynomialConsumerWrapper(Frobby::PolynomialConsumer* consumer,
size_t varCount):
ConsumerWrapper(varCount),
_consumer(consumer),
_varCount(varCount) {
ASSERT(consumer != 0);
}
virtual void consumeRing(const VarNames& names) {
ASSERT(names.getVarCount() == _varCount);
}
virtual void beginConsuming() {
_consumer->polynomialBegin(_varCount);
}
virtual void consume(const mpz_class& coef,
const Term& term,
const TermTranslator& translator) {
ASSERT(term.getVarCount() == _varCount);
ASSERT(translator.getVarCount() == _varCount);
setTerm(term, translator);
_consumer->consume(coef.get_mpz_t(), _term);
}
virtual void consume(const mpz_class& coef,
const vector<mpz_class>& term) {
ASSERT(term.size() == _varCount);
for (size_t var = 0; var < _varCount; ++var)
_term[var] = const_cast<mpz_ptr>(term[var].get_mpz_t());
_consumer->consume(coef.get_mpz_t(), _term);
}
// TODO: make a note somewhere that in case of an exception,
// polynomialEnd might not get called, this being because it is too
// much of a burden to require it not to throw any
// exceptions. Hmm... maybe there is an alternative solution.
virtual void doneConsuming() {
_consumer->polynomialEnd();
}
private:
Frobby::PolynomialConsumer* _consumer;
size_t _varCount;
};
Frobby::IdealConsumer::~IdealConsumer() {
}
void Frobby::IdealConsumer::idealBegin(size_t varCount) {
}
void Frobby::IdealConsumer::idealEnd() {
}
Frobby::PolynomialConsumer::~PolynomialConsumer() {
}
void Frobby::PolynomialConsumer::polynomialBegin(size_t varCount) {
}
void Frobby::PolynomialConsumer::polynomialEnd() {
}
namespace FrobbyImpl {
using ::BigIdeal;
class FrobbyIdealHelper {
public:
FrobbyIdealHelper(size_t variableCount):
_ideal(VarNames(variableCount)),
_atVariable(variableCount) {
}
static const BigIdeal& getIdeal(const Frobby::Ideal& ideal) {
return ideal._data->_ideal;
}
private:
friend class Frobby::Ideal;
BigIdeal _ideal;
size_t _atVariable;
};
}
Frobby::Ideal::Ideal(size_t variableCount) {
_data = new FrobbyImpl::FrobbyIdealHelper(variableCount);
}
Frobby::Ideal::Ideal(const Ideal& ideal) {
_data = new FrobbyImpl::FrobbyIdealHelper(*ideal._data);
}
Frobby::Ideal::~Ideal() {
delete _data;
}
Frobby::Ideal& Frobby::Ideal::operator=(const Ideal& ideal) {
// Allocate new object before deleting old object to leave *this
// in a valid state in case of new throwing an exception.
FrobbyImpl::FrobbyIdealHelper* newValue =
new FrobbyImpl::FrobbyIdealHelper(*ideal._data);
delete _data;
_data = newValue;
return *this;
}
void Frobby::Ideal::addExponent(const mpz_t exponent) {
ASSERT(_data->_atVariable <= _data->_ideal.getVarCount());
if (_data->_atVariable == _data->_ideal.getVarCount()) {
_data->_ideal.newLastTerm();
_data->_atVariable = 0;
if (_data->_ideal.getVarCount() == 0)
return;
}
mpz_class& ref = _data->_ideal.getLastTermExponentRef(_data->_atVariable);
mpz_set(ref.get_mpz_t(), exponent);
++_data->_atVariable;
}
void Frobby::Ideal::addExponent(int exponent) {
mpz_class tmp(exponent);
addExponent(tmp.get_mpz_t());
}
void Frobby::Ideal::addExponent(unsigned int exponent) {
mpz_class tmp(exponent);
addExponent(tmp.get_mpz_t());
}
bool Frobby::alexanderDual(const Ideal& ideal,
const mpz_t* reflectionMonomial,
IdealConsumer& consumer) {
const BigIdeal& bigIdeal = FrobbyImpl::FrobbyIdealHelper::getIdeal(ideal);
ExternalIdealConsumerWrapper wrappedConsumer
(&consumer, bigIdeal.getVarCount());
SliceParams params;
SliceFacade facade(params, bigIdeal, wrappedConsumer);
if (reflectionMonomial == 0)
facade.computeAlexanderDual();
else {
vector<mpz_class> point;
point.resize(bigIdeal.getVarCount());
for (size_t var = 0; var < bigIdeal.getVarCount(); ++var)
mpz_set(point[var].get_mpz_t(), reflectionMonomial[var]);
// We guarantee not to retain a reference to reflectionMonomial
// when providing terms to the consumer.
reflectionMonomial = 0;
try {
facade.computeAlexanderDual(point);
} catch (const FrobbyException&) {
return false;
}
}
return true;
}
bool Frobby::alexanderDual(const Ideal& ideal,
const Ideal& reflectionMonomial,
IdealConsumer& consumer) {
const BigIdeal& bigIdeal = FrobbyImpl::FrobbyIdealHelper::getIdeal(ideal);
const BigIdeal& reflectionIdeal =
FrobbyImpl::FrobbyIdealHelper::getIdeal(reflectionMonomial);
if (reflectionIdeal.getGeneratorCount() != 1)
return false;
if (reflectionIdeal.getVarCount() != bigIdeal.getVarCount())
return false;
const vector<mpz_class>& monomial = reflectionIdeal.getTerm(0);
const mpz_t* monomialPtr = 0;
if (reflectionIdeal.getVarCount() > 0)
monomialPtr = (const mpz_t*)&(monomial[0]);
return alexanderDual(ideal, monomialPtr, consumer);
}
void Frobby::multigradedHilbertPoincareSeries(const Ideal& ideal,
PolynomialConsumer& consumer) {
const BigIdeal& bigIdeal = FrobbyImpl::FrobbyIdealHelper::getIdeal(ideal);
ExternalPolynomialConsumerWrapper wrappedConsumer
(&consumer, bigIdeal.getVarCount());
SliceParams params;
SliceFacade facade(params, bigIdeal, wrappedConsumer);
facade.computeMultigradedHilbertSeries();
}
void Frobby::univariateHilbertPoincareSeries(const Ideal& ideal,
PolynomialConsumer& consumer) {
const BigIdeal& bigIdeal = FrobbyImpl::FrobbyIdealHelper::getIdeal(ideal);
ExternalPolynomialConsumerWrapper wrappedConsumer(&consumer, 1);
SliceParams params;
SliceFacade facade(params, bigIdeal, wrappedConsumer);
facade.computeUnivariateHilbertSeries();
}
class IrreducibleIdealDecoder : public Frobby::IdealConsumer {
public:
IrreducibleIdealDecoder(IdealConsumer* consumer):
_varCount(0),
_consumer(consumer),
_term(0) {
ASSERT(_consumer != 0);
}
~IrreducibleIdealDecoder() {
}
virtual void idealBegin(size_t varCount) {
_varCount = varCount;
_term.resize(varCount);
for (size_t var = 0; var < _varCount; ++var)
_term[var] = _zero.get_mpz_t();
}
virtual void idealEnd() {
_term.clear();
}
virtual void consume(mpz_ptr* exponentVector) {
_consumer->idealBegin(_varCount);
bool isIdentity = true;
for (size_t var = 0; var < _varCount; ++var) {
if (mpz_cmp_ui(exponentVector[var], 0) != 0) {
isIdentity = false;
_term[var] = exponentVector[var];
_consumer->consume(&*(_term.begin()));
_term[var] = _zero.get_mpz_t();
}
}
_consumer->idealEnd();
}
private:
size_t _varCount;
IdealConsumer* _consumer;
vector<mpz_ptr> _term;
mpz_class _zero;
};
void Frobby::irreducibleDecompositionAsIdeals(const Ideal& ideal,
IdealConsumer& consumer) {
IrreducibleIdealDecoder wrappedConsumer(&consumer);
if (!irreducibleDecompositionAsMonomials(ideal, wrappedConsumer)) {
const BigIdeal& bigIdeal = FrobbyImpl::FrobbyIdealHelper::getIdeal(ideal);
consumer.idealBegin(bigIdeal.getVarCount());
consumer.idealEnd();
}
}
bool Frobby::irreducibleDecompositionAsMonomials(const Ideal& ideal,
IdealConsumer& consumer) {
const BigIdeal& bigIdeal = FrobbyImpl::FrobbyIdealHelper::getIdeal(ideal);
if (bigIdeal.getGeneratorCount() == 0)
return false;
ExternalIdealConsumerWrapper wrappedConsumer
(&consumer, bigIdeal.getVarCount());
SliceParams params;
SliceFacade facade(params, bigIdeal, wrappedConsumer);
facade.computeIrreducibleDecomposition(true);
return true;
}
void Frobby::primaryDecomposition(const Ideal& ideal,
IdealConsumer& consumer) {
const BigIdeal& bigIdeal = FrobbyImpl::FrobbyIdealHelper::getIdeal(ideal);
ExternalIdealConsumerWrapper wrappedConsumer
(&consumer, bigIdeal.getVarCount());
SliceParams params;
SliceFacade facade(params, bigIdeal, wrappedConsumer);
facade.computePrimaryDecomposition();
}
void Frobby::maximalStandardMonomials(const Ideal& ideal,
IdealConsumer& consumer) {
const BigIdeal& bigIdeal = FrobbyImpl::FrobbyIdealHelper::getIdeal(ideal);
ExternalIdealConsumerWrapper wrappedConsumer
(&consumer, bigIdeal.getVarCount());
SliceParams params;
SliceFacade facade(params, bigIdeal, wrappedConsumer);
facade.computeMaximalStandardMonomials();
}
bool Frobby::solveStandardMonomialProgram(const Ideal& ideal,
const mpz_t* l,
IdealConsumer& consumer) {
ASSERT(l != 0);
const BigIdeal& bigIdeal = FrobbyImpl::FrobbyIdealHelper::getIdeal(ideal);
vector<mpz_class> grading;
for (size_t var = 0; var < bigIdeal.getVarCount(); ++var)
grading.push_back(mpz_class(l[var]));
ExternalIdealConsumerWrapper wrappedConsumer
(&consumer, bigIdeal.getVarCount());
SliceParams params;
params.useIndependenceSplits(false); // not supported
SliceFacade facade(params, bigIdeal, wrappedConsumer);
mpz_class dummy;
return facade.solveStandardProgram(grading, dummy, false);
}
void Frobby::codimension(const Ideal& ideal, mpz_t codim) {
const BigIdeal& bigIdeal = FrobbyImpl::FrobbyIdealHelper::getIdeal(ideal);
dimension(ideal, codim);
mpz_ui_sub(codim, bigIdeal.getVarCount(), codim);
}
void Frobby::dimension(const Ideal& ideal, mpz_t dim) {
const BigIdeal& bigIdeal = FrobbyImpl::FrobbyIdealHelper::getIdeal(ideal);
IdealFacade facade(false);
mpz_class dimen = facade.computeDimension(bigIdeal, false);
mpz_set(dim, dimen.get_mpz_t());
}
void Frobby::associatedPrimes(const Ideal& ideal, IdealConsumer& consumer) {
const BigIdeal& bigIdeal = FrobbyImpl::FrobbyIdealHelper::getIdeal(ideal);
IrreducibleIdealDecoder decodingConsumer(&consumer);
ExternalIdealConsumerWrapper wrappedConsumer
(&decodingConsumer, bigIdeal.getVarCount());
SliceParams params;
SliceFacade facade(params, bigIdeal, wrappedConsumer);
facade.computeAssociatedPrimes();
}
BigIdeal.h
BigTermConsumer.h
CoefBigTermConsumer.h
IdealFacade.h
SliceFacade.h
SliceParams.h
TermTranslator.h
Term.h
BigIdeal
Definition BigIdeal.h:27
BigTermConsumer
Definition BigTermConsumer.h:29
CoefBigTermConsumer
Definition CoefBigTermConsumer.h:29
ConsumerWrapper::ConsumerWrapper
ConsumerWrapper(size_t varCount)
Definition frobby.cpp:40
ConsumerWrapper::setTerm
void setTerm(const vector< mpz_class > &term)
Definition frobby.cpp:58
ConsumerWrapper::_varCount
size_t _varCount
Definition frobby.cpp:65
ConsumerWrapper::setTerm
void setTerm(const Term &term, const TermTranslator &translator)
Definition frobby.cpp:49
ConsumerWrapper::~ConsumerWrapper
virtual ~ConsumerWrapper()
Definition frobby.cpp:45
ConsumerWrapper::_term
mpz_ptr * _term
Definition frobby.cpp:66
ExternalIdealConsumerWrapper
Definition frobby.cpp:70
ExternalIdealConsumerWrapper::doneConsuming
virtual void doneConsuming()
Must be called once after each time beginConsuming has been called.
Definition frobby.cpp:102
ExternalIdealConsumerWrapper::ExternalIdealConsumerWrapper
ExternalIdealConsumerWrapper(Frobby::IdealConsumer *consumer, size_t varCount)
Definition frobby.cpp:72
ExternalIdealConsumerWrapper::_consumer
Frobby::IdealConsumer * _consumer
Definition frobby.cpp:107
ExternalIdealConsumerWrapper::consumeRing
virtual void consumeRing(const VarNames &names)
Tell the consumer which ring is being used.
Definition frobby.cpp:79
ExternalIdealConsumerWrapper::consume
virtual void consume(const Term &term, const TermTranslator &translator)
Definition frobby.cpp:87
ExternalIdealConsumerWrapper::consume
virtual void consume(const vector< mpz_class > &term)
Definition frobby.cpp:95
ExternalIdealConsumerWrapper::beginConsuming
virtual void beginConsuming()
Tell the consumer to begin consuming an ideal.
Definition frobby.cpp:83
ExternalPolynomialConsumerWrapper
Definition frobby.cpp:111
ExternalPolynomialConsumerWrapper::beginConsuming
virtual void beginConsuming()
Definition frobby.cpp:125
ExternalPolynomialConsumerWrapper::doneConsuming
virtual void doneConsuming()
Definition frobby.cpp:152
ExternalPolynomialConsumerWrapper::_varCount
size_t _varCount
Definition frobby.cpp:158
ExternalPolynomialConsumerWrapper::consume
virtual void consume(const mpz_class &coef, const Term &term, const TermTranslator &translator)
Definition frobby.cpp:129
ExternalPolynomialConsumerWrapper::consumeRing
virtual void consumeRing(const VarNames &names)
Definition frobby.cpp:121
ExternalPolynomialConsumerWrapper::ExternalPolynomialConsumerWrapper
ExternalPolynomialConsumerWrapper(Frobby::PolynomialConsumer *consumer, size_t varCount)
Definition frobby.cpp:113
ExternalPolynomialConsumerWrapper::_consumer
Frobby::PolynomialConsumer * _consumer
Definition frobby.cpp:157
ExternalPolynomialConsumerWrapper::consume
virtual void consume(const mpz_class &coef, const vector< mpz_class > &term)
Definition frobby.cpp:139
FrobbyException
This is the base of the Frobby exception hierarchy for exceptions that can occur due to expected erro...
Definition error.h:27
FrobbyImpl::BigIdeal
Definition BigIdeal.h:27
FrobbyImpl::BigIdeal::getTerm
const vector< mpz_class > & getTerm(size_t term) const
Definition BigIdeal.h:139
FrobbyImpl::BigIdeal::getVarCount
size_t getVarCount() const
Definition BigIdeal.h:148
FrobbyImpl::BigIdeal::getGeneratorCount
size_t getGeneratorCount() const
Definition BigIdeal.h:144
FrobbyImpl::FrobbyIdealHelper
Definition frobby.cpp:182
FrobbyImpl::FrobbyIdealHelper::FrobbyIdealHelper
FrobbyIdealHelper(size_t variableCount)
Definition frobby.cpp:184
FrobbyImpl::FrobbyIdealHelper::_atVariable
size_t _atVariable
Definition frobby.cpp:197
FrobbyImpl::FrobbyIdealHelper::getIdeal
static const BigIdeal & getIdeal(const Frobby::Ideal &ideal)
Definition frobby.cpp:189
FrobbyImpl::FrobbyIdealHelper::_ideal
BigIdeal _ideal
Definition frobby.cpp:196
Frobby::IdealConsumer
This class provides a way to get monomial ideals as output from Frobby one generator at a time.
Definition frobby.h:75
Frobby::IdealConsumer::idealBegin
virtual void idealBegin(size_t varCount)
Called before output of a monomial ideal.
Definition frobby.cpp:164
Frobby::IdealConsumer::~IdealConsumer
virtual ~IdealConsumer()
The provided implementation does nothing.
Definition frobby.cpp:161
Frobby::IdealConsumer::idealEnd
virtual void idealEnd()
Called after output of a monomial ideal.
Definition frobby.cpp:167
Frobby::Ideal
Definition frobby.h:35
Frobby::Ideal::operator=
Ideal & operator=(const Ideal &ideal)
Definition frobby.cpp:213
Frobby::Ideal::~Ideal
~Ideal()
Definition frobby.cpp:209
Frobby::Ideal::Ideal
Ideal(size_t variableCount)
Definition frobby.cpp:201
Frobby::Ideal::_data
FrobbyImpl::FrobbyIdealHelper * _data
Definition frobby.h:62
Frobby::Ideal::addExponent
void addExponent(const mpz_t exponent)
Call addExponent once for each variable to add a term one exponent at a time.
Definition frobby.cpp:225
Frobby::PolynomialConsumer
This class provides a way to get polynomials as output from Frobby one term at a time.
Definition frobby.h:112
Frobby::PolynomialConsumer::polynomialBegin
virtual void polynomialBegin(size_t varCount)
Called before output of a polynomial.
Definition frobby.cpp:173
Frobby::PolynomialConsumer::~PolynomialConsumer
virtual ~PolynomialConsumer()
The provided implementation does nothing.
Definition frobby.cpp:170
Frobby::PolynomialConsumer::polynomialEnd
virtual void polynomialEnd()
Called after output of a polynomial.
Definition frobby.cpp:176
IdealFacade
A facade for performing operations on BigIdeal.
Definition IdealFacade.h:34
IdealFacade::computeDimension
mpz_class computeDimension(const BigIdeal &ideal, bool codimension=false, bool squareFreeAndMinimal=false)
Compute the Krull dimension of ideal.
Definition IdealFacade.cpp:82
IrreducibleIdealDecoder
Definition frobby.cpp:329
IrreducibleIdealDecoder::_consumer
IdealConsumer * _consumer
Definition frobby.cpp:370
IrreducibleIdealDecoder::idealBegin
virtual void idealBegin(size_t varCount)
Called before output of a monomial ideal.
Definition frobby.cpp:341
IrreducibleIdealDecoder::idealEnd
virtual void idealEnd()
Called after output of a monomial ideal.
Definition frobby.cpp:348
IrreducibleIdealDecoder::_term
vector< mpz_ptr > _term
Definition frobby.cpp:371
IrreducibleIdealDecoder::~IrreducibleIdealDecoder
~IrreducibleIdealDecoder()
Definition frobby.cpp:338
IrreducibleIdealDecoder::_zero
mpz_class _zero
Definition frobby.cpp:372
IrreducibleIdealDecoder::_varCount
size_t _varCount
Definition frobby.cpp:369
IrreducibleIdealDecoder::IrreducibleIdealDecoder
IrreducibleIdealDecoder(IdealConsumer *consumer)
Definition frobby.cpp:331
IrreducibleIdealDecoder::consume
virtual void consume(mpz_ptr *exponentVector)
For output of a generator of the ideal.
Definition frobby.cpp:352
SliceFacade
A facade for operations on monomial ideals using the Slice Algorithm.
Definition SliceFacade.h:44
SliceFacade::computeAlexanderDual
void computeAlexanderDual(const vector< mpz_class > &point)
Compute the Alexander dual of the ideal.
Definition SliceFacade.cpp:250
SliceFacade::computeAssociatedPrimes
void computeAssociatedPrimes()
Compute the associated primes of the ideal.
Definition SliceFacade.cpp:286
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::computeUnivariateHilbertSeries
void computeUnivariateHilbertSeries()
Compute the numerator of the univariate Hilbert-Poincare series.
Definition SliceFacade.cpp:93
SliceFacade::computePrimaryDecomposition
void computePrimaryDecomposition()
Compute the unique "nicest" primary decomposition of the ideal.
Definition SliceFacade.cpp:150
SliceFacade::computeIrreducibleDecomposition
void computeIrreducibleDecomposition(bool encode)
Compute the unique irredundant set of irreducible ideals whose intersection equals ideal.
Definition SliceFacade.cpp:109
SliceFacade::computeMaximalStandardMonomials
void computeMaximalStandardMonomials()
Compute the maximal standard monomials of the ideal.
Definition SliceFacade.cpp:241
SliceParams
Definition SliceParams.h:25
SliceParams::useIndependenceSplits
void useIndependenceSplits(bool value)
Definition SliceParams.h:34
TermTranslator
TermTranslator handles translation between terms whose exponents are infinite precision integers and ...
Definition TermTranslator.h:41
TermTranslator::getExponent
const mpz_class & getExponent(size_t variable, Exponent exponent) const
This method translates from IDs to arbitrary precision integers.
Definition TermTranslator.cpp:392
TermTranslator::getVarCount
size_t getVarCount() const
Definition TermTranslator.cpp:447
Term
Term represents a product of variables which does not include a coefficient.
Definition Term.h:49
Term::getVarCount
size_t getVarCount() const
Definition Term.h:85
VarNames
Defines the variables of a polynomial ring and facilities IO involving them.
Definition VarNames.h:40
VarNames::getVarCount
size_t getVarCount() const
Returns the current number of variables.
Definition VarNames.h:113
error.h
frobby_version
const char *const frobby_version
Definition frobby.cpp:36
frobby.h
FrobbyImpl
The namespace FrobbyImpl is for internal use inside Frobby only.
Definition frobby.cpp:179
Frobby::dimension
void dimension(const Ideal &ideal, mpz_t dim)
Compute the Krull dimension of a monomial ideal.
Definition frobby.cpp:451
Frobby::alexanderDual
bool alexanderDual(const Ideal &ideal, const mpz_t *reflectionMonomial, IdealConsumer &consumer)
Compute the Alexander dual of ideal using the point reflectionMonomial.
Definition frobby.cpp:250
Frobby::irreducibleDecompositionAsIdeals
void irreducibleDecompositionAsIdeals(const Ideal &ideal, IdealConsumer &consumer)
Compute the irreducible decomposition of ideal.
Definition frobby.cpp:375
Frobby::codimension
void codimension(const Ideal &ideal, mpz_t codim)
Compute the codimension of a monomial ideal.
Definition frobby.cpp:445
Frobby::associatedPrimes
void associatedPrimes(const Ideal &ideal, IdealConsumer &consumer)
Compute the associated primes of the ideal.
Definition frobby.cpp:459
Frobby::univariateHilbertPoincareSeries
void univariateHilbertPoincareSeries(const Ideal &ideal, PolynomialConsumer &consumer)
Compute the univariate Hilbert-Poincare series of ideal.
Definition frobby.cpp:315
Frobby::solveStandardMonomialProgram
bool solveStandardMonomialProgram(const Ideal &ideal, const mpz_t *l, IdealConsumer &consumer)
Solve the optimization program.
Definition frobby.cpp:424
Frobby::irreducibleDecompositionAsMonomials
bool irreducibleDecompositionAsMonomials(const Ideal &ideal, IdealConsumer &consumer)
Compute the irreducible decomposition of ideal, and encode each irreducible component as a monomial.
Definition frobby.cpp:385
Frobby::maximalStandardMonomials
void maximalStandardMonomials(const Ideal &ideal, IdealConsumer &consumer)
Compute the maximal standard monomials of ideal.
Definition frobby.cpp:412
Frobby::primaryDecomposition
void primaryDecomposition(const Ideal &ideal, IdealConsumer &consumer)
Compute the canonical primary decomposition of a monomial ideal.
Definition frobby.cpp:400
Frobby::multigradedHilbertPoincareSeries
void multigradedHilbertPoincareSeries(const Ideal &ideal, PolynomialConsumer &consumer)
Compute the multigraded Hilbert-Poincare series of ideal.
Definition frobby.cpp:303
stdinc.h
This header file includes common definitions and is included as the first line of code in every imple...
ASSERT
#define ASSERT(X)
Definition stdinc.h:86