Learn R Programming

mixopt (version 0.1.3)

index_line_search: Line search over indexed array in one direction

Description

Line search over indexed array in one direction

Usage

index_line_search(f, xarray, y1 = NULL, plot = "none", verbose = 0)

Value

List

Arguments

f

f

xarray

xarray

y1

y1

plot

plot

verbose

Level to print

Examples

Run this code
index_line_search(function(x) {(x-100)^2}, 1:290)
index_line_search(function(x) {(-x-100)^2}, -(1:290)^.92, plot="ind")
index_line_search(function(x) {(-x-100)^2}, -(1:290)^.92, plot="x")
xx <- sort(runif(1e2, -250, -30))
index_line_search(function(x) {(-x-100)^2}, xx, plot="ind")
index_line_search(function(x) {(-x-100)^2}, xx, plot="x")

Run the code above in your browser using DataLab