Frobby 0.9.5
CommonParamsHelper.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 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
26class CommonParams;
27class Ideal;
28class DataType;
29class Scanner;
30class CommonParams;
31class BigIdeal;
32class BigTermConsumer;
34class TermTranslator;
35
39 public:
42
45 const DataType& output);
46
49
52
55 const BigIdeal& input,
56 BigTermConsumer& output);
57
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;}
68 bool hasIdeal() const {return _ideal.get() != 0;}
69
71 const TermTranslator& getTranslator() const {return *_translator;}
73
75
77
81
83
84 private:
85 // No copies
88
89 void readIdeal(const CommonParams& params, Scanner& in);
90 void setIdeal(const CommonParams& params, const BigIdeal& ideal);
91
94
97
100
102};
103
104#endif
void nameFactoryRegister(NameFactory< AbstractProduct > &factory)
Registers the string returned by ConcreteProduct::getStaticName() to a function that default-construc...
Utility class for dealing with the contents of CommonParams.
TermTranslator & getTranslator()
void setIdeal(const CommonParams &params, const BigIdeal &ideal)
CoefBigTermConsumer & getPolyConsumer()
void readIdeal(const CommonParams &params, Scanner &in)
auto_ptr< TermConsumer > makeTranslatedIdealConsumer(bool split=false)
void setIdealAndIdealOutput(const CommonParams &params, const BigIdeal &input, BigTermConsumer &output)
Use given ideal and support ideal output.
CommonParamsHelper(const CommonParamsHelper &)
BigTermConsumer & getIdealConsumer()
auto_ptr< CoefTermConsumer > makeToUnivariatePolyConsumer()
const VarNames & getNames()
void readIdealAndSetOutput(const CommonParams &params, const DataType &output)
Read input ideal and support specified kind of output.
void readIdealAndSetIdealOutput(const CommonParams &params)
Read input and support ideal output.
const TermTranslator & getTranslator() const
CommonParamsHelper & operator=(const CommonParamsHelper &)
const Ideal & getIdeal() const
void readIdealAndSetPolyOutput(const CommonParams &params)
Read input and support polynomial output.
auto_ptr< BigTermConsumer > _idealConsumerDeleter
BigTermConsumer * _idealConsumer
auto_ptr< CoefBigTermConsumer > _polyConsumerDeleter
auto_ptr< Ideal > takeIdeal()
void setIdealAndPolyOutput(const CommonParams &params, const BigIdeal &input, CoefBigTermConsumer &output)
Use given ideal and support polynomial output.
CoefBigTermConsumer * _polyConsumer
auto_ptr< TermTranslator > _translator
auto_ptr< Ideal > _ideal
auto_ptr< TermTranslator > takeTranslator()
auto_ptr< CoefTermConsumer > makeTranslatedPolyConsumer()
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
Definition DataType.h:29
Represents a monomial ideal with int exponents.
Definition Ideal.h:27
This class offers an input interface which is more convenient and for some purposes more efficient th...
Definition Scanner.h:50
TermTranslator handles translation between terms whose exponents are infinite precision integers and ...
Defines the variables of a polynomial ring and facilities IO involving them.
Definition VarNames.h:40