Frobby
0.10.0
Toggle main menu visibility
Loading...
Searching...
No Matches
src
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
24
class
CoefTermConsumer
;
25
class
HilbertStrategy
;
26
27
class
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
63
inline
void
swap(
HilbertSlice
& a,
HilbertSlice
& b) { a.swap(b); }
64
65
66
#endif
CoefTermConsumer
Definition
CoefTermConsumer.h:24
HilbertSlice
Definition
HilbertSlice.h:27
HilbertSlice::baseCase
virtual bool baseCase(bool simplified)
Definition
HilbertSlice.cpp:37
HilbertSlice::operator=
virtual Slice & operator=(const Slice &slice)
Definition
HilbertSlice.cpp:65
HilbertSlice::simplifyStep
virtual bool simplifyStep()
Definition
HilbertSlice.cpp:73
HilbertStrategy
Definition
HilbertStrategy.h:33
Ideal
Represents a monomial ideal with int exponents.
Definition
Ideal.h:27
Projection
Definition
Projection.h:29
Slice::Slice
Slice(SliceStrategy &strategy)
Definition
Slice.cpp:26
Term
Definition
Term.h:49
Generated by
1.17.0