full_index_line_search {mixopt}R Documentation

Optimize over array using line search

Description

Optimize over array using line search

Usage

full_index_line_search(
  f,
  xarray,
  startind,
  plot = "none",
  ystart = NULL,
  verbose = 0
)

Arguments

f

Function

xarray

Array of values

startind

Starting index

plot

Should plots be made?

ystart

Value of f when evaluated on element of xarray at index startind, aka f(xarray[startind])

verbose

Level of info to print

Value

List

Examples

full_index_line_search(function(x) {(x-50)^2}, 3:12, 5)
full_index_line_search(function(x) {(x-50)^2}, 3, 1)
full_index_line_search(function(x) {(x-50)^2}, 3:4, 1)
full_index_line_search(function(x) {(x-50)^2}, 3:5, 1)
full_index_line_search(function(x) {(x+50)^2}, 3, 1)
full_index_line_search(function(x) {(x+50)^2}, 3:4, 1)
full_index_line_search(function(x) {(x+50)^2}, 3:5, 1)
full_index_line_search(function(x) {(x-50)^2}, 12:3, 8)
full_index_line_search(function(x) {(x-50)^2}, 0:1000, 8)
full_index_line_search(function(x) {(x-50)^2}, 0:1000, 999)
full_index_line_search(function(x) {sin(x/30)}, 0:1000, 999)

[Package mixopt version 0.1.2 Index]