Learn R Programming

fntl (version 0.1.1)

univariate-optimization: Univariate Optimization

Description

Univariate Optimization

Usage

goldensection(f, lower, upper, args)

optimize_brent(f, lower, upper, args)

Value

A list with the form of a optimize_result described in section "Univariate Optimization" of the package vignette.

Arguments

f

Function to optimize.

lower

Lower limit of search interval. Must be finite.

upper

Upper limit of search interval. Must be finite.

args

List of additional arguments from the function optimize_args.

Examples

Run this code
f = function(x) { x^2 - 1 }
args = optimize_args()
goldensection(f, 0, 10, args)
optimize_brent(f, 0, 10, args)

Run the code above in your browser using DataLab