Frobby 0.9.5
SatBinomIdeal.h
Go to the documentation of this file.
1/* Frobby: Software for monomial ideal computations.
2 Copyright (C) 2009 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 SAT_BINOM_IDEAL_GUARD
18#define SAT_BINOM_IDEAL_GUARD
19
20#include "VarNames.h"
21
22#include <vector>
23
24class BigIdeal;
25class Matrix;
26
29 public:
32
33 void insert(const vector<mpz_class>& binom);
34 const vector<mpz_class>& getGenerator(size_t index) const;
35 size_t getGeneratorCount() const;
36
37 void print(FILE* file) const;
38 void print(ostream& out) const;
39
40 void clearAndSetNames(const VarNames& names);
41
43
45
46 void getInitialIdeal(BigIdeal& ideal) const;
47
49 void renameVars(const VarNames& names);
50
51 size_t getVarCount() const;
52
53 void clear();
54
55 void reserve(size_t size);
56 vector<mpz_class>& getLastBinomRef();
57 void newLastTerm();
58
59 const VarNames& getNames() const;
60
63 bool hasZeroEntry() const;
64
66 bool initialIdealIsWeaklyGeneric() const;
67
75 bool isGeneric() const;
76
79 void getDoubleTriangleCount(mpz_class& count) const;
80
83 bool isPointFreeBody(const vector<mpz_class>& a,
84 const vector<mpz_class>& b) const;
85
88 bool isPointFreeBody(const vector<mpz_class>& a,
89 const vector<mpz_class>& b,
90 const vector<mpz_class>& c) const;
91
93 bool isInterior(const vector<mpz_class>& a,
94 const vector<mpz_class>& b) const;
95
97 bool isInteriorEdge(size_t from, size_t to) const;
98
102 bool isTerminatingEdge(size_t from, size_t to) const;
103
106 bool validate() const;
107
110 bool isDominating(const vector<mpz_class>& v) const;
111
113 bool isGenerator(const vector<mpz_class>& v) const;
114
115 void projectVar(size_t var);
116
118
119 void getMatrix(Matrix& matrix) const;
120
121 private:
124};
125
127
128#endif
void nameFactoryRegister(NameFactory< AbstractProduct > &factory)
Registers the string returned by ConcreteProduct::getStaticName() to a function that default-construc...
ostream & operator<<(ostream &out, const SatBinomIdeal &ideal)
Represents a saturated binomial ideal.
void getDoubleTriangleCount(mpz_class &count) const
Returns the number of pairs of generators a and b such that {0,a,a+b} and {0,b,a+b} are both interior...
bool isGeneric() const
Returns true if the generating set is generic, i.e.
vector< mpz_class > & getLastBinomRef()
bool validate() const
Temporary.
bool isInterior(const vector< mpz_class > &a, const vector< mpz_class > &b) const
Returns true if max(0,a,b) is strictly positive in every element.
bool isPointFreeBody(const vector< mpz_class > &a, const vector< mpz_class > &b) const
Returns true if the smallest body containing zero, a and b has no generator in its interior.
bool isInteriorEdge(size_t from, size_t to) const
Returns whether {to,to+from} is an interior edge of Top.
void print(FILE *file) const
void renameVars(const VarNames &names)
Requires that names.getVarCount() equals getVarCount().
size_t getVarCount() const
bool isTerminatingEdge(size_t from, size_t to) const
Returns wehther {from,to+from} is an interior edge of Top and also {to,to+from} is an edge of Top (no...
size_t getGeneratorCount() const
SatBinomIdeal & operator=(const SatBinomIdeal &ideal)
void insert(const vector< mpz_class > &binom)
const VarNames & getNames() const
const vector< mpz_class > & getGenerator(size_t index) const
void removeGeneratorsWithoutLeadingZero()
void reserve(size_t size)
vector< vector< mpz_class > > _gens
bool hasZeroEntry() const
Returns true if any generator does not involve every variable, i.e.
void removeGeneratorsWithLeadingZero()
void clearAndSetNames(const VarNames &names)
bool isDominating(const vector< mpz_class > &v) const
Returns true if any generator, considered as an integer vector, is dominated by v.
void getInitialIdeal(BigIdeal &ideal) const
void getMatrix(Matrix &matrix) const
void projectVar(size_t var)
bool initialIdealIsWeaklyGeneric() const
Returns true if the initial ideal is weakly generic.
bool isGenerator(const vector< mpz_class > &v) const
Returns true if v is a generator.
Defines the variables of a polynomial ring and facilities IO involving them.
Definition VarNames.h:40