ScarfFacade.cpp
Go to the documentation of this file.
/* Frobby: Software for monomial ideal computations.
Copyright (C) 2010 University of Aarhus
Contact Bjarke Hammersholt Roune for license information (www.broune.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
*/
#include "stdinc.h"
#include "ScarfFacade.h"
#include "DataType.h"
#include "ScarfHilbertAlgorithm.h"
#include "TranslatingCoefTermConsumer.h"
#include "TotalDegreeCoefTermConsumer.h"
#include "IdealOrderer.h"
ScarfFacade::ScarfFacade(const ScarfParams& params):
Facade(params.getPrintActions()),
_params(params) {
// Create predicate before reading the input to display errors on
// options before potentially spending a long time reading the
// input.
_enumerationOrder =
createIdealOrderer(params.getEnumerationOrder());
_deformationOrder =
createIdealOrderer(params.getDeformationOrder());
_helper.readIdealAndSetPolyOutput(params);
}
ScarfFacade::~ScarfFacade() {
}
void ScarfFacade::computeMultigradedHilbertSeries() {
beginAction("Computing multigraded Hilbert-Poincare series.");
ScarfHilbertAlgorithm alg(_helper.getTranslator(),
_params,
std::move(_enumerationOrder),
std::move(_deformationOrder));
alg.runGeneric(_helper.getIdeal(),
_helper.getPolyConsumer(),
false,
_params.getProduceCanonicalOutput());
endAction();
}
void ScarfFacade::computeUnivariateHilbertSeries() {
beginAction("Computing univariate Hilbert-Poincare series.");
ScarfHilbertAlgorithm alg(_helper.getTranslator(),
_params,
std::move(_enumerationOrder),
std::move(_deformationOrder));
alg.runGeneric(_helper.getIdeal(),
_helper.getPolyConsumer(),
true,
_params.getProduceCanonicalOutput());
endAction();
}
DataType.h
createIdealOrderer
unique_ptr< IdealOrderer > createIdealOrderer(const string &prefix)
Definition IdealOrderer.cpp:280
IdealOrderer.h
ScarfFacade.h
ScarfHilbertAlgorithm.h
TotalDegreeCoefTermConsumer.h
TranslatingCoefTermConsumer.h
Facade::beginAction
void beginAction(const char *message)
Prints message to standard error if printing is turned on, and records the time when the action start...
Definition Facade.cpp:38
Facade::endAction
void endAction()
Prints to standard error the time since the last call to beginAction.
Definition Facade.cpp:51
Facade::Facade
Facade(bool printActions)
Constructs a facade that prints out what it is doing if printActions is true.
Definition Facade.cpp:20
ScarfFacade::computeMultigradedHilbertSeries
void computeMultigradedHilbertSeries()
Computes the numerator of the multigraded Hilbert-Poincare series with no cancellation of common term...
Definition ScarfFacade.cpp:44
ScarfFacade::computeUnivariateHilbertSeries
void computeUnivariateHilbertSeries()
Computes the numerator of the univariate Hilbert-Poincare series with no cancellation of common terms...
Definition ScarfFacade.cpp:60
ScarfFacade::~ScarfFacade
~ScarfFacade()
Definition ScarfFacade.cpp:41
ScarfFacade::_enumerationOrder
unique_ptr< IdealOrderer > _enumerationOrder
Definition ScarfFacade.h:45
ScarfFacade::ScarfFacade
ScarfFacade(const ScarfParams &params)
Definition ScarfFacade.cpp:27
ScarfFacade::_helper
CommonParamsHelper _helper
Definition ScarfFacade.h:44
ScarfFacade::_deformationOrder
unique_ptr< IdealOrderer > _deformationOrder
Definition ScarfFacade.h:46
ScarfFacade::_params
ScarfParams _params
Definition ScarfFacade.h:43
ScarfHilbertAlgorithm
Definition ScarfHilbertAlgorithm.h:32
ScarfHilbertAlgorithm::runGeneric
void runGeneric(const Ideal &ideal, CoefBigTermConsumer &consumer, bool univariate, bool canonical)
Definition ScarfHilbertAlgorithm.cpp:112
ScarfParams
Definition ScarfParams.h:27
ScarfParams::getDeformationOrder
const string & getDeformationOrder() const
Returns the name of the deformation ordering.
Definition ScarfParams.h:41
ScarfParams::getEnumerationOrder
const string & getEnumerationOrder() const
Returns the name of the enumeration ordering.
Definition ScarfParams.h:37
stdinc.h
This header file includes common definitions and is included as the first line of code in every imple...