Frobby 0.9.7
frobby.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 FROBBY_INCLUSION_GUARD
18#define FROBBY_INCLUSION_GUARD
19
20// This file contains the public library interface of Frobby.
21
22#include "gmp.h"
23
24extern "C" const char* const frobby_version;
25
29namespace FrobbyImpl {
30 class FrobbyIdealHelper;
31}
32
34namespace Frobby {
35 class Ideal {
36 public:
37 // Construct an ideal with variableCount variables.
38 Ideal(size_t variableCount);
39 Ideal(const Ideal& ideal);
40 ~Ideal();
41
42 Ideal& operator=(const Ideal& ideal);
43
56 void addExponent(const mpz_t exponent);
57 void addExponent(int exponent);
58 void addExponent(unsigned int exponent);
59
60 private:
63 };
64
76 public:
78 virtual ~IdealConsumer();
79
84 virtual void idealBegin(size_t varCount);
85
94 virtual void consume(mpz_ptr* exponentVector) = 0;
95
99 virtual void idealEnd();
100 };
101
113 public:
115 virtual ~PolynomialConsumer();
116
121 virtual void polynomialBegin(size_t varCount);
122
132 virtual void consume(const mpz_t coefficient, mpz_ptr* exponentVector) = 0;
133
137 virtual void polynomialEnd();
138 };
139
160 bool alexanderDual(const Ideal& ideal,
161 const mpz_t* reflectionMonomial,
162 IdealConsumer& consumer);
163
165 bool alexanderDual(const Ideal& ideal,
166 const Ideal& reflectionMonomial,
167 IdealConsumer& consumer);
168
176 void multigradedHilbertPoincareSeries(const Ideal& ideal,
177 PolynomialConsumer& consumer);
178
184 void univariateHilbertPoincareSeries(const Ideal& ideal,
185 PolynomialConsumer& consumer);
186
204 void irreducibleDecompositionAsIdeals(const Ideal& ideal,
205 IdealConsumer& consumer);
206
229 IdealConsumer& consumer);
230
247 void maximalStandardMonomials(const Ideal& ideal,
248 IdealConsumer& consumer);
249
267 bool solveStandardMonomialProgram(const Ideal& ideal,
268 const mpz_t* l,
269 IdealConsumer& consumer);
270
285 void codimension(const Ideal& ideal, mpz_t codim);
286
296 void dimension(const Ideal& ideal, mpz_t dim);
297
311 void primaryDecomposition(const Ideal& ideal, IdealConsumer& consumer);
312
316 void associatedPrimes(const Ideal& ideal, IdealConsumer& consumer);
317}
318
319#endif
This class provides a way to get monomial ideals as output from Frobby one generator at a time.
Definition frobby.h:75
virtual void idealBegin(size_t varCount)
Called before output of a monomial ideal.
Definition frobby.cpp:164
virtual ~IdealConsumer()
The provided implementation does nothing.
Definition frobby.cpp:161
virtual void idealEnd()
Called after output of a monomial ideal.
Definition frobby.cpp:167
virtual void consume(mpz_ptr *exponentVector)=0
For output of a generator of the ideal.
Ideal & operator=(const Ideal &ideal)
Definition frobby.cpp:213
Ideal(size_t variableCount)
Definition frobby.cpp:201
FrobbyImpl::FrobbyIdealHelper * _data
Definition frobby.h:62
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
This class provides a way to get polynomials as output from Frobby one term at a time.
Definition frobby.h:112
virtual void polynomialBegin(size_t varCount)
Called before output of a polynomial.
Definition frobby.cpp:173
virtual ~PolynomialConsumer()
The provided implementation does nothing.
Definition frobby.cpp:170
virtual void polynomialEnd()
Called after output of a polynomial.
Definition frobby.cpp:176
virtual void consume(const mpz_t coefficient, mpz_ptr *exponentVector)=0
For output of a term of the polynomial.
const char *const frobby_version
Definition frobby.cpp:36
The namespace FrobbyImpl is for internal use inside Frobby only.
Definition frobby.cpp:179
The namespace Frobby contains the public interface of Frobby.
Definition frobby.h:34
void dimension(const Ideal &ideal, mpz_t dim)
Compute the Krull dimension of a monomial ideal.
Definition frobby.cpp:451
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
void irreducibleDecompositionAsIdeals(const Ideal &ideal, IdealConsumer &consumer)
Compute the irreducible decomposition of ideal.
Definition frobby.cpp:375
void codimension(const Ideal &ideal, mpz_t codim)
Compute the codimension of a monomial ideal.
Definition frobby.cpp:445
void associatedPrimes(const Ideal &ideal, IdealConsumer &consumer)
Compute the associated primes of the ideal.
Definition frobby.cpp:459
void univariateHilbertPoincareSeries(const Ideal &ideal, PolynomialConsumer &consumer)
Compute the univariate Hilbert-Poincare series of ideal.
Definition frobby.cpp:315
bool solveStandardMonomialProgram(const Ideal &ideal, const mpz_t *l, IdealConsumer &consumer)
Solve the optimization program.
Definition frobby.cpp:424
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
void maximalStandardMonomials(const Ideal &ideal, IdealConsumer &consumer)
Compute the maximal standard monomials of ideal.
Definition frobby.cpp:412
void primaryDecomposition(const Ideal &ideal, IdealConsumer &consumer)
Compute the canonical primary decomposition of a monomial ideal.
Definition frobby.cpp:400
void multigradedHilbertPoincareSeries(const Ideal &ideal, PolynomialConsumer &consumer)
Compute the multigraded Hilbert-Poincare series of ideal.
Definition frobby.cpp:303