HilbertSlice.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 HILBERT_SLICE_GUARD
#define HILBERT_SLICE_GUARD
#include "Slice.h"
#include "Term.h"
#include "Ideal.h"
class CoefTermConsumer;
class HilbertStrategy;
class HilbertSlice : public Slice {
public:
HilbertSlice(HilbertStrategy& strategy);
HilbertSlice(HilbertStrategy& strategy,
const Ideal& ideal,
const Ideal& subtract,
const Term& multiply,
CoefTermConsumer* consumer);
CoefTermConsumer* getConsumer() {return _consumer;}
// *** Mutators
virtual bool baseCase(bool simplified);
virtual Slice& operator=(const Slice& slice);
virtual bool simplifyStep();
void setToProjOf(const Slice& slice,
const Projection& projection,
CoefTermConsumer* consumer);
// Efficiently swaps the values of *this and slice while avoiding
// copies.
void swap(HilbertSlice& slice);
private:
// Returns a lower bound on the content of the slice. Returns false
// if a base case is detected.
virtual bool getLowerBound(Term& bound, size_t var) const;
CoefTermConsumer* _consumer;
};
inline void swap(HilbertSlice& a, HilbertSlice& b) { a.swap(b); }
#endif
swap
void swap(HilbertSlice &a, HilbertSlice &b)
Definition HilbertSlice.h:63
Ideal.h
Slice.h
Term.h
CoefTermConsumer
Definition CoefTermConsumer.h:24
HilbertSlice
Definition HilbertSlice.h:27
HilbertSlice::setToProjOf
void setToProjOf(const Slice &slice, const Projection &projection, CoefTermConsumer *consumer)
Definition HilbertSlice.cpp:81
HilbertSlice::getLowerBound
virtual bool getLowerBound(Term &bound, size_t var) const
Calculates a lower bound that depends on var.
Definition HilbertSlice.cpp:95
HilbertSlice::baseCase
virtual bool baseCase(bool simplified)
Returns true if this slice is a base case slice, and in that case produces output in a derivative-spe...
Definition HilbertSlice.cpp:37
HilbertSlice::operator=
virtual Slice & operator=(const Slice &slice)
Performs a deep copy of slice into this object.
Definition HilbertSlice.cpp:65
HilbertSlice::simplifyStep
virtual bool simplifyStep()
Like simplify(), except that only one simplification step is performed.
Definition HilbertSlice.cpp:73
HilbertSlice::HilbertSlice
HilbertSlice(HilbertStrategy &strategy)
Definition HilbertSlice.cpp:24
HilbertSlice::_consumer
CoefTermConsumer * _consumer
Definition HilbertSlice.h:59
HilbertSlice::swap
void swap(HilbertSlice &slice)
Definition HilbertSlice.cpp:90
HilbertSlice::getConsumer
CoefTermConsumer * getConsumer()
Definition HilbertSlice.h:36
HilbertStrategy
Definition HilbertStrategy.h:33
Ideal
Represents a monomial ideal with int exponents.
Definition Ideal.h:27
Projection
Definition Projection.h:29
Slice
This class represents a slice, which is the central data structure of the Slice Algorithm.
Definition Slice.h:77
Slice::Slice
Slice(SliceStrategy &strategy)
Construct the slice in a ring of zero variables.
Definition Slice.cpp:26
Term
Term represents a product of variables which does not include a coefficient.
Definition Term.h:49