Frobby  0.9.5
HilbertStrategy.h
Go to the documentation of this file.
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"
25 
26 class HilbertSlice;
27 class Ideal;
28 class CoefTermConsumer;
29 class SliceEvent;
30 class Slice;
31 class SplitStrategy;
32 
34  public:
36  const SplitStrategy* splitStrategy);
37 
38  virtual void run(const Ideal& ideal);
39 
40  virtual bool processSlice(TaskEngine& tasks, auto_ptr<Slice> slice);
41 
42  void freeConsumer(auto_ptr<HilbertIndependenceConsumer> consumer);
43 
44  private:
45  auto_ptr<HilbertIndependenceConsumer> newConsumer();
46 
47  auto_ptr<HilbertSlice> newHilbertSlice();
48  virtual auto_ptr<Slice> allocateSlice();
49  virtual bool debugIsValidSlice(Slice* slice);
50 
51  virtual void getPivot(Term& term, Slice& slice);
52 
54  void independenceSplit(auto_ptr<Slice> slice);
55 
56  vector<HilbertIndependenceConsumer*> _consumerCache;
58 
61 };
62 
63 #endif
void freeConsumer(auto_ptr< HilbertIndependenceConsumer > consumer)
virtual auto_ptr< Slice > allocateSlice()
Directly allocate a slice of the correct type using new.
virtual void getPivot(Term &term, Slice &slice)
Used by pivotSplit to obtain a pivot.
ElementDeleter< vector< HilbertIndependenceConsumer * > > _consumerCacheDeleter
HilbertStrategy(CoefTermConsumer *consumer, const SplitStrategy *splitStrategy)
virtual bool debugIsValidSlice(Slice *slice)
Check that this slice is valid for use with this strategy.
IndependenceSplitter _indepSplitter
auto_ptr< HilbertSlice > newHilbertSlice()
vector< HilbertIndependenceConsumer * > _consumerCache
CoefTermConsumer * _consumer
virtual void run(const Ideal &ideal)
Run the Slice algorithm.
virtual bool processSlice(TaskEngine &tasks, auto_ptr< Slice > slice)
Process the parameter slice.
void independenceSplit(auto_ptr< Slice > slice)
auto_ptr< HilbertIndependenceConsumer > newConsumer()
Represents a monomial ideal with int exponents.
Definition: Ideal.h:27
This class adds code to the SliceStrategy base class that is useful for derived classes.
This class represents a slice, which is the central data structure of the Slice Algorithm.
Definition: Slice.h:77
A SplitStrategy is an implementation of a split selection strategy for the Slice Algorithm.
Definition: SplitStrategy.h:30
TaskEngine handles a list of tasks that are to be carried out.
Definition: TaskEngine.h:40
Term represents a product of variables which does not include a coefficient.
Definition: Term.h:49