Frobby 0.10.0
Loading...
Searching...
No Matches
HilbertSlice.h
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 HILBERT_SLICE_GUARD
18#define HILBERT_SLICE_GUARD
19
20#include "Slice.h"
21#include "Term.h"
22#include "Ideal.h"
23
25class HilbertStrategy;
26
27class HilbertSlice : public Slice {
28 public:
29 HilbertSlice(HilbertStrategy& strategy);
30 HilbertSlice(HilbertStrategy& strategy,
31 const Ideal& ideal,
32 const Ideal& subtract,
33 const Term& multiply,
34 CoefTermConsumer* consumer);
35
36 CoefTermConsumer* getConsumer() {return _consumer;}
37
38 // *** Mutators
39
40 virtual bool baseCase(bool simplified);
41
42 virtual Slice& operator=(const Slice& slice);
43
44 virtual bool simplifyStep();
45
46 void setToProjOf(const Slice& slice,
47 const Projection& projection,
48 CoefTermConsumer* consumer);
49
50 // Efficiently swaps the values of *this and slice while avoiding
51 // copies.
52 void swap(HilbertSlice& slice);
53
54 private:
55 // Returns a lower bound on the content of the slice. Returns false
56 // if a base case is detected.
57 virtual bool getLowerBound(Term& bound, size_t var) const;
58
59 CoefTermConsumer* _consumer;
60};
61
62
63inline void swap(HilbertSlice& a, HilbertSlice& b) { a.swap(b); }
64
65
66#endif
Definition CoefTermConsumer.h:24
Definition HilbertSlice.h:27
virtual bool baseCase(bool simplified)
Definition HilbertSlice.cpp:37
virtual Slice & operator=(const Slice &slice)
Definition HilbertSlice.cpp:65
virtual bool simplifyStep()
Definition HilbertSlice.cpp:73
Definition HilbertStrategy.h:33
Represents a monomial ideal with int exponents.
Definition Ideal.h:27
Definition Projection.h:29
Slice(SliceStrategy &strategy)
Definition Slice.cpp:26
Definition Term.h:49