BarBorManual: How to use BarBor function minimum approximator.

Description Usage Arguments Examples

Description

Approximate a functions minimum with double monoton method.

Usage

1
BarBor(exp,eps,x,v,n)

Arguments

exp

Expression of the function to be minimized.

eps

Precision of the approximation, recommended value is 10^-10.

x

Starting point of the approximation.

v

A character vector of the functions variables, for instance the two dimension fuction x1*x1+10*x2*x2 needs a c("x1","x2") vector.

n

Maximum setps to make while approximating, if the calculation reaches this number it exits with the current value and point. Recommended to be 10000.

Examples

1
2
3
4
5
6
test1 = expression(x1*x1+10*x2*x2)
eps = 10^-15
x = c(3,4)
v = c("x1","x2")
n = 10000
BarBor(test1,eps,x,v,n)

Example output

[1] "Stationary point: "
[1] 0 0
[1] "Function value: "
[1] 0
[1] "Steps: "
[1] 10
Warning messages:
1: In alph * gk :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

2: In alph * gk :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

3: In alph * gk :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

4: In alph * gk :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

5: In alph * gk :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

6: In alph * gk :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

7: In alph * gk :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

8: In alph * gk :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

9: In alph * gk :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

BarBorGradient documentation built on May 2, 2019, 6:11 a.m.