Frobby  0.9.5
IndependenceSplitter.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 INDEPENDENCE_SPLITTER_GUARD
18 #define INDEPENDENCE_SPLITTER_GUARD
19 
20 #include "Partition.h"
21 #include "Projection.h"
22 #include "Ideal.h"
23 #include <vector>
24 #include "MsmSlice.h"
25 
26 class Ideal;
27 class Term;
28 
30  public:
31  // Returns true if there are independent subsets of variables. The
32  // other methods should only be called when the most recent call to
33  // analyze returned true.
34  bool analyze(const Slice& slice);
35 
36  size_t getVarCount() const;
37 
38  size_t getOneVarCount() const {return _oneVarCount;}
39  size_t getTwoVarCount() const {return _twoVarCount;}
40  size_t getMoreThanTwoCount() const {return _moreThanTwoVarCount;}
41 
42  // Get the projection to the biggest independent subset of variables.
43  void getBigProjection(Projection& projection) const;
44 
45  // Get the projection to the rest of the variables.
46  void getRestProjection(Projection& projection) const;
47 
48  private:
50 
51  size_t _oneVarCount;
52  size_t _twoVarCount;
54 
55  size_t _bigSet;
56 };
57 
58 #endif
Represents a monomial ideal with int exponents.
Definition: Ideal.h:27
void getRestProjection(Projection &projection) const
size_t getOneVarCount() const
size_t getTwoVarCount() const
void getBigProjection(Projection &projection) const
size_t getMoreThanTwoCount() const
bool analyze(const Slice &slice)
This class represents a slice, which is the central data structure of the Slice Algorithm.
Definition: Slice.h:77
Term represents a product of variables which does not include a coefficient.
Definition: Term.h:49