Package de.labathome.trustconstr
Class BFGS.BFGSFactory
java.lang.Object
de.labathome.trustconstr.FullHessianUpdateStrategy.FullHessianUpdateStrategyFactory<BFGS.BFGSFactory>
de.labathome.trustconstr.BFGS.BFGSFactory
- Enclosing class:
- BFGS
public static class BFGS.BFGSFactory
extends FullHessianUpdateStrategy.FullHessianUpdateStrategyFactory<BFGS.BFGSFactory>
Builder for
BFGS; configure via BFGS.FACTORY.-
Field Summary
Fields inherited from class de.labathome.trustconstr.FullHessianUpdateStrategy.FullHessianUpdateStrategyFactory
initialScale, initialScaleAuto -
Constructor Summary
ConstructorsConstructorDescriptionPublic so callers can construct a fresh factory per build instead of mutating the sharedBFGS.FACTORYsingleton (whose state leaks across calls and tests). -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a configuredBFGSinstance.exceptionStrategy(ExceptionStrategy exceptionStrategy) Choose how to proceed when the curvature condition is violated:SKIP_UPDATEskips the update entirely;DAMP_UPDATEinterpolates between the actual BFGS result and the unmodified matrix.minCurvature(double minCurvature) Minimum curvaturedot(delta_grad, delta_x)(scaled by a normalization factor) allowed to bypass the exception strategy.Methods inherited from class de.labathome.trustconstr.FullHessianUpdateStrategy.FullHessianUpdateStrategyFactory
initalScale, initialScaleAuto, self
-
Constructor Details
-
BFGSFactory
public BFGSFactory()Public so callers can construct a fresh factory per build instead of mutating the sharedBFGS.FACTORYsingleton (whose state leaks across calls and tests). Same fix pattern asScalarFunction.ScalarFunctionFactory.
-
-
Method Details
-
exceptionStrategy
Choose how to proceed when the curvature condition is violated:SKIP_UPDATEskips the update entirely;DAMP_UPDATEinterpolates between the actual BFGS result and the unmodified matrix. Both strategies are described in Nocedal & Wright (2006), pp.536-537.- Parameters:
exceptionStrategy- strategy to apply on curvature violation- Returns:
- this factory, for chaining
-
minCurvature
Minimum curvaturedot(delta_grad, delta_x)(scaled by a normalization factor) allowed to bypass the exception strategy. Default is1e-8forSKIP_UPDATEand0.2forDAMP_UPDATE.- Parameters:
minCurvature- curvature threshold- Returns:
- this factory, for chaining
-
build
Build a configuredBFGSinstance.- Returns:
- a fresh
BFGSwith the configured options
-