public interface FunctionGradient
Modifier and Type | Interface and Description |
---|---|
static class |
FunctionGradient.PartialDerivative
A class for storing a partial derivative.
|
static class |
FunctionGradient.SparseGradient
A sparse
FunctionGradient that only explicitly stores
the partial derivative for parameters with non-zero partial derivatives. |
Modifier and Type | Method and Description |
---|---|
java.util.Set<FunctionGradient.PartialDerivative> |
getNonZeroPartialDerivatives()
Returns all non-zero partial derivatives.
|
double |
getPartialDerivative(int parameterId)
Returns the partial derivative for the given weight
|
int |
numNonZeroPDs()
Returns the number of non-zero partial derivatives
|
void |
put(int parameterId,
double partialDerivative)
Adds the partial derivative for a given weight
|
void put(int parameterId, double partialDerivative)
parameterId
- the parameter identifier for which the partial derivative is to be stored.partialDerivative
- the partial derivative value for the parameterdouble getPartialDerivative(int parameterId)
parameterId
- the parameter for which the partial derivative will be returnedjava.util.Set<FunctionGradient.PartialDerivative> getNonZeroPartialDerivatives()
Map.Entry
where
the key is an Integer of the parameter identifier and the value is a double specifying its partial
derivative.int numNonZeroPDs()