AssociatedPrimesAction.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 "AssociatedPrimesAction.h"
#include "SliceFacade.h"
#include "SliceParams.h"
#include "DataType.h"
AssociatedPrimesAction::AssociatedPrimesAction():
Action
(staticGetName(),
"Compute the associated primes of the input ideal.",
"Computes the associated prime ideals of the input monomial ideal. The\n"
"computation is accomplished using irreducible decomposition. The quality "
"of the\n"
"algorithm for computing associated primes is expected to be much improved "
"in a\n"
"future version of Frobby.",
false),
_io(DataType::getMonomialIdealType(), DataType::getMonomialIdealType()) {
}
void AssociatedPrimesAction::obtainParameters(vector<Parameter*>& parameters) {
_io.obtainParameters(parameters);
_sliceParams.obtainParameters(parameters);
Action::obtainParameters(parameters);
}
void AssociatedPrimesAction::perform() {
SliceParams params(_params);
validateSplit(params, true, false);
SliceFacade facade(params, DataType::getMonomialIdealListType());
facade.computeAssociatedPrimes();
}
const char* AssociatedPrimesAction::staticGetName() {
return "assoprimes";
}
AssociatedPrimesAction.h
DataType.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
AssociatedPrimesAction::AssociatedPrimesAction
AssociatedPrimesAction()
Definition AssociatedPrimesAction.cpp:24
AssociatedPrimesAction::perform
virtual void perform()
Definition AssociatedPrimesAction.cpp:45
AssociatedPrimesAction::_sliceParams
SliceParameters _sliceParams
Definition AssociatedPrimesAction.h:35
AssociatedPrimesAction::_io
IOParameters _io
Definition AssociatedPrimesAction.h:36
AssociatedPrimesAction::staticGetName
static const char * staticGetName()
Definition AssociatedPrimesAction.cpp:52
AssociatedPrimesAction::obtainParameters
virtual void obtainParameters(vector< Parameter * > &parameters)
Definition AssociatedPrimesAction.cpp:39
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
SliceFacade
A facade for operations on monomial ideals using the Slice Algorithm.
Definition SliceFacade.h:44
SliceFacade::computeAssociatedPrimes
void computeAssociatedPrimes()
Compute the associated primes of the ideal.
Definition SliceFacade.cpp:286
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...