public class ParameterAssignment extends Object implements Serializable, IStochasticOccurrence
matrix
). This is, in other words, the basic input
for the PPPM. Each object is associated with a specific
ParameterInstance
and therefore with a specific Parameter
. It
also has a specific probability to occur, therefore
IStochasticOccurrence
is implemented.
Example for an assignment: TFR is constant at 1.3 for native population in
the next 100 years.
Created on January 20, 2007Constructor and Description |
---|
ParameterAssignment() |
ParameterAssignment(ParameterInstance instance)
Default constructor.
|
ParameterAssignment(ParameterInstance instance,
String assignName,
String desc,
double prob,
double dev,
Matrix val)
Full constructor.
|
ParameterAssignment(String matrixString,
ParameterInstance instance,
String assignName,
String desc,
double prob,
double dev)
Constructor for bean compatibility.
|
Modifier and Type | Method and Description |
---|---|
ParameterAssignment |
getCopy()
Copies the assignment.
|
String |
getDescription() |
double |
getDeviation() |
int |
getID() |
Matrix |
getMatrix() |
String |
getMatrixBinary()
Returns the matrix value as a byte array (for serialization).
|
Matrix2D |
getMatrixValue()
This method returns the fixed matrix values, as entered by the user.
|
String |
getName() |
ParameterInstance |
getParamInstance() |
double |
getProbability()
Get the probability that this entity will be chosen.
|
void |
setDescription(String description) |
void |
setDeviation(Double newDeviation)
Sets deviation.
|
void |
setID(int uniqueID) |
void |
setMatrix(Matrix matrix) |
void |
setMatrixBinary(String matrixString)
Sets matrix from a byte array (for deserialization).
|
void |
setMatrixValue(Matrix2D matrix2D)
Sets the matrix value.
|
void |
setName(String name) |
void |
setParamInstance(ParameterInstance paramInstance) |
void |
setProbability(double probability)
Set probability for being chosen.
|
String |
toString() |
public ParameterAssignment(ParameterInstance instance)
instance
- parameter instance to which this assignment belongspublic ParameterAssignment(ParameterInstance instance, String assignName, String desc, double prob, double dev, Matrix val)
instance
- the associated instanceassignName
- the name of the assignmentdesc
- the description of the assignmentprob
- the probability of the assignmentdev
- the assumption-inherent deviationval
- the assigned valuepublic ParameterAssignment()
public ParameterAssignment(String matrixString, ParameterInstance instance, String assignName, String desc, double prob, double dev) throws ClassNotFoundException, IOException
IOException
ClassNotFoundException
public void setMatrixBinary(String matrixString) throws ClassNotFoundException, IOException
matrixString
- the byte array which contains the persistent matrix objectIOException
ClassNotFoundException
public String getMatrixBinary() throws IOException
IOException
public ParameterAssignment getCopy()
public double getProbability()
IStochasticOccurrence
getProbability
in interface IStochasticOccurrence
public void setProbability(double probability)
IStochasticOccurrence
setProbability
in interface IStochasticOccurrence
probability
- the probability (in [0,1])public String getDescription()
public void setDescription(String description)
public String getName()
public void setName(String name)
public Matrix getMatrix()
public void setMatrix(Matrix matrix)
public void setMatrixValue(Matrix2D matrix2D)
matrix2D
- the new matrix valuepublic Matrix2D getMatrixValue()
public ParameterInstance getParamInstance()
public void setParamInstance(ParameterInstance paramInstance)
public int getID()
public void setID(int uniqueID)
public double getDeviation()
public void setDeviation(Double newDeviation)
Double
as a
parameter, which can be null. This is checked, and the primitive is set
accordingly.newDeviation
- the deviationCopyright © 2012. All Rights Reserved.