|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.parameters.ParameterSet
de.jstacs.parameters.InstanceParameterSet
de.jstacs.parameters.SequenceScoringParameterSet
de.jstacs.models.discrete.DGMParameterSet
public abstract class DGMParameterSet
The super ParameterSet
for any parameter set of
a DiscreteGraphicalModel
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.jstacs.parameters.ParameterSet |
---|
ParameterSet.ParameterList |
Field Summary |
---|
Fields inherited from class de.jstacs.parameters.SequenceScoringParameterSet |
---|
alphabet, length |
Fields inherited from class de.jstacs.parameters.ParameterSet |
---|
errorMessage, parameters, parent, ranged |
Constructor Summary | |
---|---|
protected |
DGMParameterSet(Class<? extends DiscreteGraphicalModel> instanceClass,
AlphabetContainer alphabet,
double ess,
String description)
The constructor for models that can handle variable lengths. |
protected |
DGMParameterSet(Class<? extends DiscreteGraphicalModel> instanceClass,
AlphabetContainer alphabet,
int length,
double ess,
String description)
The constructor for models that can handle only sequences of fixed length given by length . |
protected |
DGMParameterSet(Class<? extends DiscreteGraphicalModel> instanceClass,
boolean simple,
boolean variableLength)
An empty constructor. |
protected |
DGMParameterSet(StringBuffer s)
The standard constructor for the interface Storable . |
Method Summary | |
---|---|
DGMParameterSet |
clone()
Creates a full clone (deep copy) of this ParameterSet . |
String |
getInstanceName()
Returns the name of an instance of the class that can be constructed using this ParameterSet . |
boolean |
hasDefaultOrIsSet()
Returns true if all parameters in this ParameterSet
are either set by the user or have default values. |
protected void |
loadParameters()
Loads the parameters for this ParameterSet . |
void |
setEss(double ess)
This method can be used to set the ess (equivalent sample size) of this parameter set. |
Methods inherited from class de.jstacs.parameters.SequenceScoringParameterSet |
---|
equals, fromXML, getAlphabetContainer, getLength, getNumberOfParameters, getParameterAt, replaceParametersWithRangedInstance, reset, toXML |
Methods inherited from class de.jstacs.parameters.InstanceParameterSet |
---|
getInstance, getInstanceClass, getInstanceComment |
Methods inherited from class de.jstacs.parameters.ParameterSet |
---|
fromGalaxy, getErrorMessage, getId, getIndex, getNumberOfValues, getParent, initParameterList, initParameterList, isAtomic, isRanged, makeRanged, next, parametersLoaded, propagateId, recieveId, resetToFirst, setParent, simplify, toGalaxy, valuesToString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DGMParameterSet(StringBuffer s) throws NonParsableException
Storable
.
Creates a new DiscreteGraphicalModel
out of its XML
representation.
s
- the XML representation as StringBuffer
NonParsableException
- if the DiscreteGraphicalModel
could not be
reconstructed out of the XML representation (the
StringBuffer
could not be parsed)Storable
,
SequenceScoringParameterSet.SequenceScoringParameterSet(StringBuffer)
protected DGMParameterSet(Class<? extends DiscreteGraphicalModel> instanceClass, boolean simple, boolean variableLength)
DGMParameterSet
from the
class that can be instantiated using this DGMParameterSet
.
instanceClass
- the (sub-)classsimple
- indicates whether the alphabet should be simple or notvariableLength
- indicates whether the model can handle sequences of variable
lengthSequenceScoringParameterSet.SequenceScoringParameterSet(Class,
AlphabetContainer.AlphabetContainerType, boolean, boolean)
protected DGMParameterSet(Class<? extends DiscreteGraphicalModel> instanceClass, AlphabetContainer alphabet, double ess, String description) throws Exception
DGMParameterSet
with a description
from the
class that can be instantiated using this DGMParameterSet
, a
given AlphabetContainer
and a given equivalent
sample size (ess).
instanceClass
- the (sub-)classalphabet
- the alphabetess
- the ess (equivalent sample size)description
- the description
Exception
- if something went wrongprotected DGMParameterSet(Class<? extends DiscreteGraphicalModel> instanceClass, AlphabetContainer alphabet, int length, double ess, String description) throws Exception
length
. Creates a new DGMParameterSet
with
a description
from the class that can be instantiated using
this DGMParameterSet
, a given AlphabetContainer
and a
given equivalent sample size (ess).
instanceClass
- the (sub-)classalphabet
- the alphabetlength
- the length of the modeled sequencesess
- the ess (equivalent sample size)description
- the description
Exception
- if something went wrongMethod Detail |
---|
protected void loadParameters() throws Exception
ParameterSet
ParameterSet
. This is in most cases
done by calling ParameterSet.initParameterList()
or
ParameterSet.initParameterList(int)
to initialize
ParameterSet.parameters
and afterwards filling
ParameterSet.parameters
with instances of subclasses of
Parameter
.
loadParameters
in class ParameterSet
Exception
- if the parameters could not be loadedParameter
,
ParameterSet.parameters
,
ParameterSet.initParameterList()
,
ParameterSet.initParameterList(int)
public boolean hasDefaultOrIsSet()
ParameterSet
true
if all parameters in this ParameterSet
are either set by the user or have default values. If any additional
constraints are required on your parameters you should either specify
some ParameterValidator
on these parameters or implement these
constraints by overriding this method in your implementation of
ParameterSet
. It is recommended to specify a useful remark which
constraint failed in the member-variable errorMessage
, which
will be displayed to the user. In the overriding method
super.
ParameterSet.hasDefaultOrIsSet()
should be called prior to
checking specific constraints.
hasDefaultOrIsSet
in class SequenceScoringParameterSet
true
if all parameters have some allowed value set,
false
otherwisepublic String getInstanceName()
InstanceParameterSet
ParameterSet
.
getInstanceName
in class InstanceParameterSet
public DGMParameterSet clone() throws CloneNotSupportedException
ParameterSet
ParameterSet
. As a
convenience-method the user can use
fillWithStandardFieldsForClone(ParameterSet)
on a newly
created instance of a subclass of ParameterSet
to obtain a
clone/copy of all standard member variables (those already defined in
ParameterSet
) in the passed ParameterSet
. Using this
method, the cloning process becomes merely three-step:ParameterSet
, most
likely with an empty constructor or the one taking just the instance
class.
this.fillWithStandardFieldsForClone
on this
instance.
Object
's method
Object.clone()
.
clone
in class SequenceScoringParameterSet
ParameterSet
CloneNotSupportedException
public void setEss(double ess) throws SimpleParameter.IllegalValueException
ess
- the ess (equivalent sample size)
SimpleParameter.IllegalValueException
- if the ess is negative
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |