MaximalStandardAction.cpp
Go to the documentation of this file.
/* Frobby: Software for monomial ideal computations.
Copyright (C) 2007 Bjarke Hammersholt Roune (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 "MaximalStandardAction.h"
#include "SliceFacade.h"
#include "SliceParams.h"
#include "DataType.h"
MaximalStandardAction::MaximalStandardAction():
Action
(staticGetName(),
"Compute the maximal standard monomials of the input ideal.",
"Compute the maximal standard monomials of the input ideal. A standard "
"monomial\nis a monomial that does not lie in the ideal, while a "
"maximal\nstandard monomial m is a standard monomial such that m * v does "
"lie in the\nideal for every variable v in the ambient polynomial ring of I.",
false),
_io(DataType::getMonomialIdealType(), DataType::getMonomialIdealType()),
_increment
("increment",
"Increase each entry of the output by 1 to compute maximal staircase\n"
"monomials in place of maximal standard monomials.",
false) {
}
const char* MaximalStandardAction::staticGetName() {
return "maxstandard";
}
void MaximalStandardAction::obtainParameters(vector<Parameter*>& parameters) {
_io.obtainParameters(parameters);
_sliceParams.obtainParameters(parameters);
parameters.push_back(&_increment);
Action::obtainParameters(parameters);
}
void MaximalStandardAction::perform() {
SliceParams params(_params);
validateSplit(params, true, false);
SliceFacade facade(params, DataType::getMonomialIdealListType());
if (_increment)
facade.computeMaximalStaircaseMonomials();
else
facade.computeMaximalStandardMonomials();
}
DataType.h
MaximalStandardAction.h
SliceFacade.h
validateSplit
void validateSplit(const SliceParams &params, bool allowLabel, bool allowDegree)
Definition SliceParams.cpp:61
SliceParams.h
Action::_params
CliParams _params
Definition Action.h:59
Action::Action
Action(const char *name, const char *shortDescription, const char *description, bool acceptsNonParameter)
Definition Action.cpp:46
Action::obtainParameters
virtual void obtainParameters(vector< Parameter * > &parameters)
Definition Action.cpp:133
DataType
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
Definition DataType.h:29
DataType::getMonomialIdealListType
static const DataType & getMonomialIdealListType()
Returns the one and only instance for monomial ideal lists.
Definition DataType.cpp:54
MaximalStandardAction::_io
IOParameters _io
Definition MaximalStandardAction.h:37
MaximalStandardAction::_sliceParams
SliceParameters _sliceParams
Definition MaximalStandardAction.h:36
MaximalStandardAction::MaximalStandardAction
MaximalStandardAction()
Definition MaximalStandardAction.cpp:24
MaximalStandardAction::obtainParameters
virtual void obtainParameters(vector< Parameter * > &parameters)
Definition MaximalStandardAction.cpp:47
MaximalStandardAction::perform
virtual void perform()
Definition MaximalStandardAction.cpp:54
MaximalStandardAction::staticGetName
static const char * staticGetName()
Definition MaximalStandardAction.cpp:43
MaximalStandardAction::_increment
BoolParameter _increment
Definition MaximalStandardAction.h:38
SliceFacade
A facade for operations on monomial ideals using the Slice Algorithm.
Definition SliceFacade.h:44
SliceFacade::computeMaximalStaircaseMonomials
void computeMaximalStaircaseMonomials()
Compute the maximal staircase monomials of the ideal.
Definition SliceFacade.cpp:229
SliceFacade::computeMaximalStandardMonomials
void computeMaximalStandardMonomials()
Compute the maximal standard monomials of the ideal.
Definition SliceFacade.cpp:241
SliceParams
Definition SliceParams.h:25
stdinc.h
This header file includes common definitions and is included as the first line of code in every imple...