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
DifferentiableSequenceScores funs. |
abstract StringBuffer |
toXML()
Encodes the prior as an XML representation.
|
findOneDimensionalMinclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitevaluateFunction, getDimensionOfScopepublic 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
DifferentiableFunctionx, i.e.,
.evaluateGradientOfFunction in class DifferentiableFunctionparams - 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 DifferentiableSequenceScores 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
DifferentiableSequenceScores funs.freeParameters - the switch for using only the free parameters or all
parameters in a DifferentiableSequenceScorefuns - the DifferentiableSequenceScores for the priorException - if the DifferentiableSequenceScores could not be setpublic abstract StringBuffer toXML()
set(boolean, DifferentiableSequenceScore...)
has to be invoked after decoding.public abstract String getInstanceName()