Frobby 0.9.5
ScarfHilbertAlgorithm.h
Go to the documentation of this file.
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
21class Consumer;
23class TermTranslator;
25class ScarfParams;
26class IdealOrderer;
27class IdealTree;
28
29#include "Term.h"
30#include "Ideal.h"
31
33 public:
34 ScarfHilbertAlgorithm(const TermTranslator& translator,
35 const ScarfParams& params,
36 auto_ptr<IdealOrderer> enumerationOrder,
37 auto_ptr<IdealOrderer> deformationOrder);
39
40 void runGeneric(const Ideal& ideal,
41 CoefBigTermConsumer& consumer,
42 bool univariate,
43 bool canonical);
44
45 private:
46 struct State {
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
67 const auto_ptr<IdealOrderer> _enumerationOrder;
68 const auto_ptr<IdealOrderer> _deformationOrder;
69
72};
73
74#endif
Objects of this class represents a monomial ideal.
Definition: IdealTree.h:29
Represents a monomial ideal with int exponents.
Definition: Ideal.h:27
Cont::const_iterator const_iterator
Definition: Ideal.h:43
void enumerateScarfComplex(const Ideal &ideal, CoefTermConsumer &consumer)
void doEnumerationBaseCase(const State &state, CoefTermConsumer &consumer)
const ScarfParams & _params
bool doEnumerationStep(const Ideal &ideal, const IdealTree &tree, State &state, State &nextState)
void runGeneric(const Ideal &ideal, CoefBigTermConsumer &consumer, bool univariate, bool canonical)
const TermTranslator & _translator
const auto_ptr< IdealOrderer > _deformationOrder
void initializeEnumeration(const Ideal &ideal, size_t &activeStateCount)
ScarfHilbertAlgorithm(const TermTranslator &translator, const ScarfParams &params, auto_ptr< IdealOrderer > enumerationOrder, auto_ptr< IdealOrderer > deformationOrder)
const auto_ptr< IdealOrderer > _enumerationOrder
TermTranslator handles translation between terms whose exponents are infinite precision integers and ...
Term represents a product of variables which does not include a coefficient.
Definition: Term.h:49