|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectp3j.pppm.parameters.ParameterAssignment
public class ParameterAssignment
One assignment of a parameter instance. This is a matrix with a concrete
name, a description, and a specific content (stored in
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, 2007
Constructor Summary | |
---|---|
ParameterAssignment()
Constructor for bean compatibility. |
|
ParameterAssignment(ParameterInstance instance)
Default constructor. |
|
ParameterAssignment(ParameterInstance instance,
String assignName,
String desc,
double prob,
double dev,
Matrix val)
Full constructor. |
Method Summary | |
---|---|
ParameterAssignment |
getCopy()
Copies the assignment. |
String |
getDescription()
|
double |
getDeviation()
|
int |
getID()
|
Matrix |
getMatrix()
|
byte[] |
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(byte[] byteArray)
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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()
Method Detail |
---|
public void setMatrixBinary(byte[] byteArray)
byteArray
- the byte array which contains the persistent matrix objectpublic byte[] getMatrixBinary()
public ParameterAssignment getCopy()
public String toString()
toString
in class Object
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()
ParameterAssignment#getMatrixValueForExecution(...)
.
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 deviation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |