IrreducibleDecomAction.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 "IrreducibleDecomAction.h"
#include "SliceFacade.h"
#include "SliceParams.h"
#include "DataType.h"
IrreducibleDecomAction::IrreducibleDecomAction():
Action
(staticGetName(),
"Compute the irreducible decomposition of the input ideal.",
"Compute the irredundant irreducible decomposition of the input monomial "
"ideal.\n\n"
"The decomposition is computed using the Slice Algorithm. This algorithm is\n"
"described in the paper `The Slice Algorithm For Irreducible Decomposition "
"of\n"
"Monomial Ideals', which is available at www.broune.com .",
false),
_encode("encode",
"Encode the decomposition as monomials generating an ideal.",
false),
_io(DataType::getMonomialIdealType(), DataType::getMonomialIdealType()) {
}
void IrreducibleDecomAction::obtainParameters(vector<Parameter*>& parameters) {
_io.obtainParameters(parameters);
parameters.push_back(&_encode);
_sliceParams.obtainParameters(parameters);
Action::obtainParameters(parameters);
}
void IrreducibleDecomAction::perform() {
SliceParams params(_params);
validateSplit(params, true, false);
const DataType& output = _encode ?
DataType::getMonomialIdealType() :
DataType::getMonomialIdealListType();
SliceFacade facade(params, output);
facade.computeIrreducibleDecomposition(_encode);
}
const char* IrreducibleDecomAction::staticGetName() {
return "irrdecom";
}
DataType.h
IrreducibleDecomAction.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
DataType::getMonomialIdealType
static const DataType & getMonomialIdealType()
Returns the one and only instance for monomial ideals.
Definition DataType.cpp:45
IrreducibleDecomAction::_encode
BoolParameter _encode
Definition IrreducibleDecomAction.h:36
IrreducibleDecomAction::obtainParameters
virtual void obtainParameters(vector< Parameter * > &parameters)
Definition IrreducibleDecomAction.cpp:43
IrreducibleDecomAction::IrreducibleDecomAction
IrreducibleDecomAction()
Definition IrreducibleDecomAction.cpp:24
IrreducibleDecomAction::_sliceParams
SliceParameters _sliceParams
Definition IrreducibleDecomAction.h:37
IrreducibleDecomAction::_io
IOParameters _io
Definition IrreducibleDecomAction.h:38
IrreducibleDecomAction::staticGetName
static const char * staticGetName()
Definition IrreducibleDecomAction.cpp:60
IrreducibleDecomAction::perform
virtual void perform()
Definition IrreducibleDecomAction.cpp:50
SliceFacade
A facade for operations on monomial ideals using the Slice Algorithm.
Definition SliceFacade.h:44
SliceFacade::computeIrreducibleDecomposition
void computeIrreducibleDecomposition(bool encode)
Compute the unique irredundant set of irreducible ideals whose intersection equals ideal.
Definition SliceFacade.cpp:109
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...