Parameters
Class Parameter

java.lang.Object
  extended by Parameters.Parameter
All Implemented Interfaces:
java.io.Serializable

public class Parameter
extends java.lang.Object
implements java.io.Serializable

Represents a parameter of a model

Version:
1.0
See Also:
Serialized Form

Nested Class Summary
static class Parameter.FormatException
          Exception thrown when the format of a parameter string is incorrect
 
Method Summary
 Parameter clone()
           
 boolean getEstimate()
          Returns whether this paramater is a parameter that should be estimated
 double getLowerBound()
          Gets the lower bound of a parameter
 java.lang.String getName()
          Gets the name of the parameter
 double getUpperBound()
          Gets the upper bound of a parameter
 double getValue()
          Gets the value of the parameter
 boolean matrix()
          Whether this parameter is in a rate matrix.
static Parameter newEstimatedBoundedParameter(java.lang.String name, double lbound, double ubound)
          Creates a new bounded parameter that is estimated.
static Parameter newEstimatedBoundedParameter(java.lang.String name, double lbound, double ubound, boolean matrix)
          Creates a new bounded paramater that is estimated and is optionally in a rate matrix
static Parameter newEstimatedParameter(java.lang.String name)
          Creates a new (unbounded) paramater that is estimated.
static Parameter newEstimatedParameter(java.lang.String name, boolean matrix)
          Creates a new unbounded parameter that is estimated and is optionally in a rate matrix.
static Parameter newEstimatedPositiveParameter(java.lang.String name)
          Creates a new parameter that has to be positive and is estimated.
static Parameter newEstimatedPositiveParameter(java.lang.String name, boolean matrix)
          Creates a new positive parameter that is estimated and is optionally in a rate matrix.
static Parameter newFixedParameter(java.lang.String name, double value)
          Creates a new fixed parameter (i.e.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

clone

public Parameter clone()
Overrides:
clone in class java.lang.Object

getName

public java.lang.String getName()
Gets the name of the parameter

Returns:
The name

getValue

public double getValue()
Gets the value of the parameter

Returns:
The value

getLowerBound

public double getLowerBound()
Gets the lower bound of a parameter

Returns:
The lower bound

getUpperBound

public double getUpperBound()
Gets the upper bound of a parameter

Returns:
The upper bound

getEstimate

public boolean getEstimate()
Returns whether this paramater is a parameter that should be estimated

Returns:
Whether this parameter is to be estimated

matrix

public boolean matrix()
Whether this parameter is in a rate matrix.

Returns:
Whether this parameter is in a rate matrix.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

newEstimatedPositiveParameter

public static Parameter newEstimatedPositiveParameter(java.lang.String name)
Creates a new parameter that has to be positive and is estimated. Defaults to being in a rate matrix.

Parameters:
name - The name of the parameter
Returns:
The parameter

newEstimatedParameter

public static Parameter newEstimatedParameter(java.lang.String name)
Creates a new (unbounded) paramater that is estimated. Defaults to being in a rate matrix.

Parameters:
name - The name of the parameter
Returns:
The parameter

newEstimatedBoundedParameter

public static Parameter newEstimatedBoundedParameter(java.lang.String name,
                                                     double lbound,
                                                     double ubound)
Creates a new bounded parameter that is estimated. Defaults to being in a rate matrix.

Parameters:
name - The name of the parameter
lbound - The lower bound of the value the parameter can take
ubound - The upper bound of the value the parameter cantake
Returns:
The parameter

newFixedParameter

public static Parameter newFixedParameter(java.lang.String name,
                                          double value)
Creates a new fixed parameter (i.e. it is not estimated).

Parameters:
name - The parameters name
value - The value of the parameter
Returns:
The parameter

newEstimatedPositiveParameter

public static Parameter newEstimatedPositiveParameter(java.lang.String name,
                                                      boolean matrix)
Creates a new positive parameter that is estimated and is optionally in a rate matrix.

Parameters:
name - The name of the parameter
matrix - Whether the parameter is in a rate matrix
Returns:
The parameter

newEstimatedParameter

public static Parameter newEstimatedParameter(java.lang.String name,
                                              boolean matrix)
Creates a new unbounded parameter that is estimated and is optionally in a rate matrix.

Parameters:
name - The name if the parameter
matrix - Whether the parameter is in a rate matrix
Returns:
The parameter

newEstimatedBoundedParameter

public static Parameter newEstimatedBoundedParameter(java.lang.String name,
                                                     double lbound,
                                                     double ubound,
                                                     boolean matrix)
Creates a new bounded paramater that is estimated and is optionally in a rate matrix

Parameters:
name - The name of the parameter
lbound - The lower bound of the value the parameter can take
ubound - The upper bound of the value the parameter cantake
matrix - Whether the parameter is in a rate matrix
Returns:
The parameter