Frobby
0.10.0
Toggle main menu visibility
Loading...
Searching...
No Matches
src
ScarfHilbertAlgorithm.h
1
/* Frobby: Software for monomial ideal computations.
2
Copyright (C) 2010 University of Aarhus
3
Contact Bjarke Hammersholt Roune for license information (www.broune.com)
4
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with this program. If not, see http://www.gnu.org/licenses/.
17
*/
18
#ifndef SCARF_HILBERT_ALGORITHM_GUARD
19
#define SCARF_HILBERT_ALGORITHM_GUARD
20
21
class
Consumer;
22
class
CoefTermConsumer
;
23
class
TermTranslator
;
24
class
CoefBigTermConsumer
;
25
class
ScarfParams
;
26
class
IdealOrderer
;
27
class
IdealTree
;
28
29
#include "Term.h"
30
#include "Ideal.h"
31
32
class
ScarfHilbertAlgorithm {
33
public
:
34
ScarfHilbertAlgorithm(
const
TermTranslator
& translator,
35
const
ScarfParams
& params,
36
unique_ptr<IdealOrderer> enumerationOrder,
37
unique_ptr<IdealOrderer> deformationOrder);
38
~ScarfHilbertAlgorithm();
39
40
void
runGeneric(
const
Ideal
& ideal,
41
CoefBigTermConsumer
& consumer,
42
bool
univariate,
43
bool
canonical);
44
45
private
:
46
struct
State {
47
Term
term;
48
Ideal::const_iterator pos;
49
vector<Exponent*> face;
50
bool
plus;
51
};
52
vector<State> _states;
53
54
void
enumerateScarfComplex(
const
Ideal
& ideal,
55
CoefTermConsumer
& consumer);
56
void
initializeEnumeration(
const
Ideal
& ideal,
57
size_t
& activeStateCount);
58
bool
doEnumerationStep(
const
Ideal
& ideal,
59
const
IdealTree
& tree,
60
State& state,
61
State& nextState);
62
void
doEnumerationBaseCase(
const
State& state,
63
CoefTermConsumer
& consumer);
64
65
const
TermTranslator
& _translator;
66
const
ScarfParams
& _params;
67
const
unique_ptr<IdealOrderer> _enumerationOrder;
68
const
unique_ptr<IdealOrderer> _deformationOrder;
69
70
size_t
_totalStates;
71
size_t
_totalFaces;
72
};
73
74
#endif
CoefBigTermConsumer
Definition
CoefBigTermConsumer.h:29
CoefTermConsumer
Definition
CoefTermConsumer.h:24
IdealOrderer
Definition
IdealOrderer.h:23
IdealTree
Definition
IdealTree.h:29
Ideal
Represents a monomial ideal with int exponents.
Definition
Ideal.h:27
ScarfParams
Definition
ScarfParams.h:27
TermTranslator
Definition
TermTranslator.h:41
Term
Definition
Term.h:49
Generated by
1.17.0