public abstract class LogPrior extends DifferentiableFunction implements Storable
Modifier and Type | Field and Description |
---|---|
static int |
UNKNOWN
Sometimes the method
Function.getDimensionOfScope()
can not return a value. |
Constructor and Description |
---|
LogPrior() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addGradientFor(double[] params,
double[] vector)
Adds the gradient of the log-prior using the current parameters to a
given vector.
|
double[] |
evaluateGradientOfFunction(double[] params)
Evaluates the gradient of a function at a certain vector (in mathematical
sense)
x , i.e.,
![]() |
abstract String |
getInstanceName()
Returns a short instance name.
|
abstract LogPrior |
getNewInstance()
This method returns an empty new instance of the current prior.
|
void |
set(boolean freeParameters,
DifferentiableSequenceScore... funs)
Resets all pre-computed values to their initial values using the
DifferentiableSequenceScore s funs . |
abstract StringBuffer |
toXML()
Encodes the prior as an XML representation.
|
findOneDimensionalMin
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
evaluateFunction, getDimensionOfScope
public static final int UNKNOWN
Function.getDimensionOfScope()
can not return a value. In these cases it is recommended to use this
constant.public abstract void addGradientFor(double[] params, double[] vector) throws EvaluationException
params
- the parametersvector
- the vectorEvaluationException
- if the gradient could not be evaluatedpublic final double[] evaluateGradientOfFunction(double[] params) throws EvaluationException
DifferentiableFunction
x
, i.e.,
evaluateGradientOfFunction
in class DifferentiableFunction
params
- the current vectorFunction.getDimensionOfScope()
EvaluationException
- if there was something wrong during the evaluation of the
gradientFunction.getDimensionOfScope()
public abstract LogPrior getNewInstance() throws CloneNotSupportedException
DifferentiableSequenceScore
s that may be inside the instance. The DifferentiableSequenceScore
s must be
set by an invocation of the method
set(boolean, DifferentiableSequenceScore...)
.CloneNotSupportedException
- if something went wrong while cloningset(boolean, DifferentiableSequenceScore...)
public void set(boolean freeParameters, DifferentiableSequenceScore... funs) throws Exception
DifferentiableSequenceScore
s funs
.freeParameters
- the switch for using only the free parameters or all
parameters in a DifferentiableSequenceScore
funs
- the DifferentiableSequenceScore
s for the priorException
- if the DifferentiableSequenceScore
s could not be setpublic abstract StringBuffer toXML()
set(boolean, DifferentiableSequenceScore...)
has to be invoked after decoding.public abstract String getInstanceName()