Frobby 0.9.5
PivotEulerAlg.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 PIVOT_EULER_ALG_GUARD
19#define PIVOT_EULER_ALG_GUARD
20
21#include "PivotStrategy.h"
22
23#include <vector>
24#include <cstdio>
25
26class Ideal;
28class EulerState;
29
31 public:
33
34 const mpz_class& computeEulerCharacteristic(const Ideal& ideal);
35 const mpz_class& computeEulerCharacteristic(const RawSquareFreeIdeal& ideal);
36 const mpz_class& getComputedEulerCharacteristic() const {return _euler;}
37
38 void setPivotStrategy(auto_ptr<PivotStrategy> strategy) {
39 _pivotStrategy = strategy;
40 }
41
44
45 void setAutoTranspose(bool value) {_autoTranspose = value;}
46 bool getAutoTranspose() const {return _autoTranspose;}
47
50
51 void setUseManyDivSimplify(bool value) {_useManyDivSimplify = value;}
53
54 void setUseAllPairsSimplify(bool value) {_useAllPairsSimplify = value;}
56
57 private:
58 void computeEuler(EulerState* state);
59 bool autoTranspose(EulerState& state);
60
62 void getPivot(const EulerState& state, Word* pivot);
63
64 mpz_class _euler;
66 vector<size_t> _divCountsTmp;
67
73 auto_ptr<PivotStrategy> _pivotStrategy;
74};
75
76#endif
Represents a monomial ideal with int exponents.
Definition: Ideal.h:27
bool getInitialAutoTranspose() const
Definition: PivotEulerAlg.h:43
bool _useAllPairsSimplify
Definition: PivotEulerAlg.h:70
bool getUseUniqueDivSimplify() const
Definition: PivotEulerAlg.h:49
void setAutoTranspose(bool value)
Definition: PivotEulerAlg.h:45
bool getUseAllPairsSimplify() const
Definition: PivotEulerAlg.h:55
bool _useManyDivSimplify
Definition: PivotEulerAlg.h:69
void setUseUniqueDivSimplify(bool value)
Definition: PivotEulerAlg.h:48
EulerState * processState(EulerState &state)
bool _useUniqueDivSimplify
Definition: PivotEulerAlg.h:68
void setPivotStrategy(auto_ptr< PivotStrategy > strategy)
Definition: PivotEulerAlg.h:38
auto_ptr< PivotStrategy > _pivotStrategy
Definition: PivotEulerAlg.h:73
const mpz_class & computeEulerCharacteristic(const Ideal &ideal)
mpz_class _euler
Definition: PivotEulerAlg.h:64
void setUseManyDivSimplify(bool value)
Definition: PivotEulerAlg.h:51
bool getUseManyDivSimplify() const
Definition: PivotEulerAlg.h:52
vector< size_t > _divCountsTmp
Definition: PivotEulerAlg.h:66
void setUseAllPairsSimplify(bool value)
Definition: PivotEulerAlg.h:54
bool _initialAutoTranspose
Definition: PivotEulerAlg.h:72
bool autoTranspose(EulerState &state)
void setInitialAutoTranspose(bool value)
Definition: PivotEulerAlg.h:42
void computeEuler(EulerState *state)
const mpz_class & getComputedEulerCharacteristic() const
Definition: PivotEulerAlg.h:36
void getPivot(const EulerState &state, Word *pivot)
bool getAutoTranspose() const
Definition: PivotEulerAlg.h:46
A bit packed square free ideal placed in a pre-allocated buffer.
unsigned long Word
The native unsigned type for the CPU.
Definition: stdinc.h:93