Function fitBrent

  • fitBrent(target: TargetFn<number>, lower: number, upper: number, control?: Partial<BrentControlParam>, maxIterations?: number): { converged: boolean; data: any; evaluations: number; iterations: number; location: number; value: number }
  • Run the Brent 1d minimisation on a target function. This is a convenience function and offers little control but a compact interface. For more control, use Brent directly.

    Returns

    See Brent.result for details

    Parameters

    • target: TargetFn<number>

      The function to be minimised

    • lower: number

      The lower bound of the interval to search in

    • upper: number

      The upper bound of the interval to search in

    • control: Partial<BrentControlParam> = {}

      Control parameters for the optimisation

    • maxIterations: number = Infinity

      The maximum number of iterations of the algorithm (calls to Brent.step()) to take. Because the algorithm is guaranteed to converge, a value of Infinity is safe, and is the default.

    Returns { converged: boolean; data: any; evaluations: number; iterations: number; location: number; value: number }

    • converged: boolean

      Has the algorithm converged?

    • data: any

      Any additional data returned by the target function, for this point

    • evaluations: number

      The number of times that target has been called so far

    • iterations: number

      The number of times that step has been called so far

    • location: number

      The best found location

    • value: number

      The value of target(location)

Generated using TypeDoc