Class BFGS.BFGSFactory

Enclosing class:
BFGS

Builder for BFGS; configure via BFGS.FACTORY.
  • Constructor Details

    • BFGSFactory

      public BFGSFactory()
      Public so callers can construct a fresh factory per build instead of mutating the shared BFGS.FACTORY singleton (whose state leaks across calls and tests). Same fix pattern as ScalarFunction.ScalarFunctionFactory.
  • Method Details

    • exceptionStrategy

      public BFGS.BFGSFactory exceptionStrategy(ExceptionStrategy exceptionStrategy)
      Choose how to proceed when the curvature condition is violated: SKIP_UPDATE skips the update entirely; DAMP_UPDATE interpolates 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

      public BFGS.BFGSFactory minCurvature(double minCurvature)
      Minimum curvature dot(delta_grad, delta_x) (scaled by a normalization factor) allowed to bypass the exception strategy. Default is 1e-8 for SKIP_UPDATE and 0.2 for DAMP_UPDATE.
      Parameters:
      minCurvature - curvature threshold
      Returns:
      this factory, for chaining
    • build

      public BFGS build()
      Build a configured BFGS instance.
      Returns:
      a fresh BFGS with the configured options