CoefTermConsumer.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 "CoefTermConsumer.h"
#include "Polynomial.h"
CoefTermConsumer::~CoefTermConsumer() {
}
void CoefTermConsumer::consume(const Polynomial& poly) {
beginConsuming();
for (size_t index = 0; index < poly.getTermCount(); ++index)
consume(poly.getCoef(index), poly.getTerm(index));
doneConsuming();
}
CoefTermConsumer.h
Polynomial.h
CoefTermConsumer::beginConsuming
virtual void beginConsuming()=0
CoefTermConsumer::~CoefTermConsumer
virtual ~CoefTermConsumer()
Definition CoefTermConsumer.cpp:22
CoefTermConsumer::consume
virtual void consume(const Polynomial &poly)
Definition CoefTermConsumer.cpp:25
CoefTermConsumer::doneConsuming
virtual void doneConsuming()=0
Polynomial
Definition Polynomial.h:23
Polynomial::getTermCount
size_t getTermCount() const
Definition Polynomial.cpp:36
Polynomial::getTerm
const Term & getTerm(size_t index) const
Definition Polynomial.cpp:45
Polynomial::getCoef
const mpz_class & getCoef(size_t index) const
Definition Polynomial.cpp:40
stdinc.h
This header file includes common definitions and is included as the first line of code in every imple...