Frobby 0.10.0
Loading...
Searching...
No Matches
HilbertStrategy.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_STRATEGY_GUARD
18#define HILBERT_STRATEGY_GUARD
19
20#include <vector>
21#include "IndependenceSplitter.h"
22#include "SliceStrategyCommon.h"
23#include "ElementDeleter.h"
24#include "HilbertIndependenceConsumer.h"
25
26class HilbertSlice;
27class Ideal;
29class SliceEvent;
30class Slice;
31class SplitStrategy;
32
33class HilbertStrategy : public SliceStrategyCommon {
34 public:
35 HilbertStrategy(CoefTermConsumer* consumer,
36 const SplitStrategy* splitStrategy);
37 virtual ~HilbertStrategy();
38
39 virtual void run(const Ideal& ideal);
40
41 virtual bool processSlice(TaskEngine& tasks, unique_ptr<Slice> slice);
42
43 void freeConsumer(unique_ptr<HilbertIndependenceConsumer> consumer);
44
45 private:
46 unique_ptr<HilbertIndependenceConsumer> newConsumer();
47
48 unique_ptr<HilbertSlice> newHilbertSlice();
49 virtual unique_ptr<Slice> allocateSlice();
50 virtual bool debugIsValidSlice(Slice* slice);
51
52 virtual void getPivot(Term& term, Slice& slice);
53
54 IndependenceSplitter _indepSplitter;
55 void independenceSplit(unique_ptr<Slice> slice);
56
57 vector<HilbertIndependenceConsumer*> _consumerCache;
59
60 CoefTermConsumer* _consumer;
61 bool _useIndependence;
62};
63
64#endif
Definition CoefTermConsumer.h:24
Definition ElementDeleter.h:50
Definition HilbertSlice.h:27
virtual bool processSlice(TaskEngine &tasks, unique_ptr< Slice > slice)
Definition HilbertStrategy.cpp:71
virtual void run(const Ideal &ideal)
Definition HilbertStrategy.cpp:41
Represents a monomial ideal with int exponents.
Definition Ideal.h:27
Definition IndependenceSplitter.h:29
virtual unique_ptr< Slice > allocateSlice()=0
Definition Slice.h:77
Definition SplitStrategy.h:30
Definition TaskEngine.h:40
Definition Term.h:49