de.jstacs.models.discrete.inhomogeneous.parameters
Class FSDAGMParameterSet

java.lang.Object
  extended by de.jstacs.parameters.ParameterSet
      extended by de.jstacs.parameters.InstanceParameterSet
          extended by de.jstacs.models.discrete.DGMParameterSet
              extended by de.jstacs.models.discrete.inhomogeneous.parameters.IDGMParameterSet
                  extended by de.jstacs.models.discrete.inhomogeneous.parameters.FSDAGMParameterSet
All Implemented Interfaces:
RangeIterator, Storable, Cloneable

public class FSDAGMParameterSet
extends IDGMParameterSet

The class for the parameters of a FSDAGModel.

Author:
Jens Keilwagen
See Also:
FSDAGModel, FSDAGModelForGibbsSampling

Nested Class Summary
 
Nested classes/interfaces inherited from class de.jstacs.parameters.ParameterSet
ParameterSet.ParameterList
 
Field Summary
 
Fields inherited from class de.jstacs.parameters.InstanceParameterSet
alphabet, length
 
Fields inherited from class de.jstacs.parameters.ParameterSet
alternativeInstanceClass, errorMessage, parameters, parent, ranged
 
Constructor Summary
FSDAGMParameterSet(Class<? extends FSDAGModel> clazz)
          This is the constructor that creates an empty parameter set.
FSDAGMParameterSet(Class<? extends FSDAGModel> clazz, AlphabetContainer alphabet, int length, double ess, String description, String graph)
          This is the constructor that creates a filled parameter set.
FSDAGMParameterSet(StringBuffer s)
          The constructor for the Storable interface.
 
Method Summary
static String encode(int[][] graph)
          This method can be used to encode adjacency list to a graph description string.
 String getInstanceComment()
          Returns a comment (a textual description) of the class that can be constructed using this ParameterSet.
protected  void loadParameters()
          Loads the parameters for this ParameterSet.
 
Methods inherited from class de.jstacs.models.discrete.inhomogeneous.parameters.IDGMParameterSet
getModelInstanceName
 
Methods inherited from class de.jstacs.models.discrete.DGMParameterSet
clone, getInstanceName, hasDefaultOrIsSet, setEss
 
Methods inherited from class de.jstacs.parameters.InstanceParameterSet
equals, fromXML, getAlphabet, getIndex, getLength, getNumberOfParameters, getParameterAt, replaceParametersWithRangedInstance, reset, toXML
 
Methods inherited from class de.jstacs.parameters.ParameterSet
getErrorMessage, getId, getInstance, getInstanceClass, getNumberOfValues, getParent, initParameterList, initParameterList, isAtomic, isRanged, makeRanged, next, parametersLoaded, propagateId, recieveId, resetToFirst, setAlternativeInstanceClass, setParent, simplify, valuesToString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSDAGMParameterSet

public FSDAGMParameterSet(StringBuffer s)
                   throws NonParsableException
The constructor for the Storable interface.

Parameters:
s - the StringBuffer
Throws:
NonParsableException - if the StringBuffer is not parsable

FSDAGMParameterSet

public FSDAGMParameterSet(Class<? extends FSDAGModel> clazz)
This is the constructor that creates an empty parameter set.

Parameters:
clazz - the class of the object that will be created with this parameter set
See Also:
FSDAGModel, FSDAGModelForGibbsSampling

FSDAGMParameterSet

public FSDAGMParameterSet(Class<? extends FSDAGModel> clazz,
                          AlphabetContainer alphabet,
                          int length,
                          double ess,
                          String description,
                          String graph)
                   throws Exception
This is the constructor that creates a filled parameter set.

Parameters:
clazz - the class of the object that will be created with this parameter set
alphabet - the alphabet container that is used in the model
length - the length of the model (has to be positive)
ess - the equivalent sample size (has to be positive)
description - a short description of the model (used for a better handling of the object by the user)
graph - the graph description string, encodes in XML-like manner the parents of each node "<parents node=i>j,k,l</parents>"
Throws:
Exception - if something went wrong
See Also:
encode(int[][])
Method Detail

loadParameters

protected void loadParameters()
                       throws Exception
Description copied from class: ParameterSet
Loads the parameters for this ParameterSet. This is in most cases done by simply creating a new ArrayList<Parameter> for the field parameters/code> and filling it with instances of subclasses of Parameter

Overrides:
loadParameters in class DGMParameterSet
Throws:
Exception - an Exception is thrown if the parameters could not be loaded
See Also:
ParameterSet.parameters, Parameter

getInstanceComment

public String getInstanceComment()
Description copied from class: ParameterSet
Returns a comment (a textual description) of the class that can be constructed using this ParameterSet.

Specified by:
getInstanceComment in class ParameterSet
Returns:
the comment

encode

public static String encode(int[][] graph)
This method can be used to encode adjacency list to a graph description string.

Parameters:
graph - graph[i] contains the parents of node i
Returns:
the graph description string