Frobby 0.9.5
HilbertIndependenceConsumer.cpp
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#include "stdinc.h"
19
21#include "HilbertStrategy.h"
22
30
44
50
55
59
64
67
70
73
75 const Term& term) {
76 ASSERT(_parent != 0);
77 ASSERT(coef != 0);
78 consumeLeft(coef, term);
79}
80
85
90
95
100
104
107
109consume(const mpz_class& coef, const Term& term) {
110 _parent->consumeRight(coef, term);
111}
112
115
137
139 const Term& term) {
142 ASSERT(coef != 0);
143
144 _rightTerms.insert(term);
145 _rightCoefs.push_back(coef);
146}
void nameFactoryRegister(NameFactory< AbstractProduct > &factory)
Registers the string returned by ConcreteProduct::getStaticName() to a function that default-construc...
virtual void consume(const Polynomial &poly)
RightConsumer(HilbertIndependenceConsumer *parent)
virtual void consume(const mpz_class &coef, const Term &term)
virtual void consumeRing(const VarNames &names)
const Projection & getRightProjection() const
virtual void consumeRight(const mpz_class &coef, const Term &term)
virtual void run(TaskEngine &engine)
Does whatever work this task represents.
void reset(CoefTermConsumer *parent, IndependenceSplitter &splitter, size_t varCount)
const Projection & getLeftProjection() const
virtual void consumeLeft(const mpz_class &leftCoef, const Term &leftTerm)
virtual void dispose()
Called when the task is no longer used but run has not and will not be called.
HilbertIndependenceConsumer(HilbertStrategy *strategy)
virtual void consume(const mpz_class &coef, const Term &term)
void freeConsumer(auto_ptr< HilbertIndependenceConsumer > consumer)
size_t getGeneratorCount() const
Definition Ideal.h:57
void clearAndSetVarCount(size_t varCount)
Definition Ideal.cpp:646
void clear()
Definition Ideal.cpp:641
void insert(const Exponent *term)
Definition Ideal.cpp:455
const_iterator begin() const
Definition Ideal.h:48
size_t getVarCount() const
Definition Ideal.h:56
void inverseProject(Term &to, const Exponent *from) const
size_t getRangeVarCount() const
TaskEngine handles a list of tasks that are to be carried out.
Definition TaskEngine.h:40
Term represents a product of variables which does not include a coefficient.
Definition Term.h:49
void reset(size_t newVarCount)
Definition Term.h:551
size_t getVarCount() const
Definition Term.h:85
Defines the variables of a polynomial ring and facilities IO involving them.
Definition VarNames.h:40
#define ASSERT(X)
Definition stdinc.h:86