Frobby
0.10.0
Toggle main menu visibility
Loading...
Searching...
No Matches
src
CommonParamsHelper.h
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 COMMON_PARAMS_HELPER
19
#define COMMON_PARAMS_HELPER
20
21
#include "CoefTermConsumer.h"
22
#include "TermConsumer.h"
23
#include "TermTranslator.h"
24
#include "Ideal.h"
25
26
class
CommonParams
;
27
class
Ideal
;
28
class
DataType
;
29
class
Scanner
;
30
class
CommonParams
;
31
class
BigIdeal
;
32
class
BigTermConsumer
;
33
class
CoefBigTermConsumer
;
34
class
TermTranslator
;
35
38
class
CommonParamsHelper {
39
public
:
40
CommonParamsHelper();
41
~CommonParamsHelper();
42
44
void
readIdealAndSetOutput
(
const
CommonParams
& params,
45
const
DataType
& output);
46
48
void
readIdealAndSetPolyOutput
(
const
CommonParams
& params);
49
51
void
readIdealAndSetIdealOutput
(
const
CommonParams
& params);
52
54
void
setIdealAndIdealOutput
(
const
CommonParams
& params,
55
const
BigIdeal
& input,
56
BigTermConsumer
& output);
57
59
void
setIdealAndPolyOutput
(
const
CommonParams
& params,
60
const
BigIdeal
& input,
61
CoefBigTermConsumer
& output);
62
63
const
VarNames
& getNames() {
return
_translator->getNames();}
64
65
Ideal
& getIdeal() {
return
*_ideal;}
66
const
Ideal
& getIdeal()
const
{
return
*_ideal;}
67
unique_ptr<Ideal> takeIdeal() {
return
std::move(_ideal);}
68
bool
hasIdeal()
const
{
return
_ideal.get() != 0;}
69
70
TermTranslator
& getTranslator() {
return
*_translator;}
71
const
TermTranslator
& getTranslator()
const
{
return
*_translator;}
72
unique_ptr<TermTranslator> takeTranslator() {
return
std::move(_translator);}
73
74
BigTermConsumer
& getIdealConsumer() {
return
*_idealConsumer;}
75
76
unique_ptr<TermConsumer> makeTranslatedIdealConsumer(
bool
split =
false
);
77
78
CoefBigTermConsumer
& getPolyConsumer() {
return
*_polyConsumer;}
79
unique_ptr<CoefTermConsumer> makeTranslatedPolyConsumer();
80
unique_ptr<CoefTermConsumer> makeToUnivariatePolyConsumer();
81
82
void
addPurePowersAtInfinity();
83
84
private
:
85
// No copies
86
CommonParamsHelper(
const
CommonParamsHelper&);
87
CommonParamsHelper& operator=(
const
CommonParamsHelper&);
88
89
void
readIdeal(
const
CommonParams
& params,
Scanner
& in);
90
void
setIdeal(
const
CommonParams
& params,
const
BigIdeal
& ideal);
91
92
unique_ptr<Ideal> _ideal;
93
unique_ptr<TermTranslator> _translator;
94
95
BigTermConsumer
* _idealConsumer;
96
unique_ptr<BigTermConsumer> _idealConsumerDeleter;
97
98
CoefBigTermConsumer
* _polyConsumer;
99
unique_ptr<CoefBigTermConsumer> _polyConsumerDeleter;
100
101
bool
_produceCanonicalOutput;
102
};
103
104
#endif
BigIdeal
Definition
BigIdeal.h:27
BigTermConsumer
Definition
BigTermConsumer.h:29
CoefBigTermConsumer
Definition
CoefBigTermConsumer.h:29
CommonParamsHelper::setIdealAndIdealOutput
void setIdealAndIdealOutput(const CommonParams ¶ms, const BigIdeal &input, BigTermConsumer &output)
Definition
CommonParamsHelper.cpp:110
CommonParamsHelper::readIdealAndSetOutput
void readIdealAndSetOutput(const CommonParams ¶ms, const DataType &output)
Definition
CommonParamsHelper.cpp:54
CommonParamsHelper::readIdealAndSetIdealOutput
void readIdealAndSetIdealOutput(const CommonParams ¶ms)
Definition
CommonParamsHelper.cpp:98
CommonParamsHelper::readIdealAndSetPolyOutput
void readIdealAndSetPolyOutput(const CommonParams ¶ms)
Definition
CommonParamsHelper.cpp:85
CommonParamsHelper::setIdealAndPolyOutput
void setIdealAndPolyOutput(const CommonParams ¶ms, const BigIdeal &input, CoefBigTermConsumer &output)
Definition
CommonParamsHelper.cpp:119
CommonParams
Definition
CommonParams.h:25
DataType
Definition
DataType.h:29
Ideal
Represents a monomial ideal with int exponents.
Definition
Ideal.h:27
Scanner
Definition
Scanner.h:50
TermTranslator
Definition
TermTranslator.h:41
VarNames
Definition
VarNames.h:38
Generated by
1.17.0