Package de.labathome.trustconstr
Class FullHessianUpdateStrategy.FullHessianUpdateStrategyFactory<T extends FullHessianUpdateStrategy.FullHessianUpdateStrategyFactory<T>>
java.lang.Object
de.labathome.trustconstr.FullHessianUpdateStrategy.FullHessianUpdateStrategyFactory<T>
- Type Parameters:
T- concrete subclass type, returned by every parent setter
- Direct Known Subclasses:
BFGS.BFGSFactory,SR1.SR1Factory
- Enclosing class:
- FullHessianUpdateStrategy
public static class FullHessianUpdateStrategy.FullHessianUpdateStrategyFactory<T extends FullHessianUpdateStrategy.FullHessianUpdateStrategyFactory<T>>
extends Object
Shared base factory for
BFGS.BFGSFactory and SR1.SR1Factory.
Generic over the self-type T so that fluent chains preserve
the subclass type: a call like
new BFGS.BFGSFactory().initalScale(0.5).exceptionStrategy(...).build()
stays in the BFGSFactory type all the way through. Without the
self-type, initalScale would return FullHessianUpdateStrategyFactory
and the subsequent .exceptionStrategy(...).build() calls would not compile.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleUser-specified initial scale, used wheninitialScaleAutoisfalse.protected booleanWhether the initial Hessian scale is auto-derived from the first step. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault-construct: initial scale is auto-derived. -
Method Summary
Modifier and TypeMethodDescriptioninitalScale(double initialScale) Pin the initial Hessian scale to a user-supplied value.Use the auto-derived initial scale (the default).protected Tself()
-
Field Details
-
initialScaleAuto
protected boolean initialScaleAutoWhether the initial Hessian scale is auto-derived from the first step. -
initialScale
protected double initialScaleUser-specified initial scale, used wheninitialScaleAutoisfalse.
-
-
Constructor Details
-
FullHessianUpdateStrategyFactory
protected FullHessianUpdateStrategyFactory()Default-construct: initial scale is auto-derived.
-
-
Method Details
-
self
- Returns:
thistyped as the subclassT(fluent-self)
-
initialScaleAuto
Use the auto-derived initial scale (the default).- Returns:
- this factory (typed as
T), for chaining - Throws:
RuntimeException- ifinitalScale(double)was already called
-
initalScale
Pin the initial Hessian scale to a user-supplied value.- Parameters:
initialScale- scaling factor for the identity initialisation- Returns:
- this factory (typed as
T), for chaining - Throws:
RuntimeException- ifinitialScaleAuto()was already called
-