# Global univariate minimization of Lipschitz functions using Pijavski method

### Description

Pijavski performs global univariate optimization of a Lipschitz function fn. The return value is a list containing x,val=fn(x), precision reached and number of iterations made. Pijavski code in C++ is being called from R environment with multiple arguments

### Usage

1 | ```
Pijavski( fn, Lips, a, b, iter, prec, env)
``` |

### Arguments

`fn` |
input, a pointer to the objective function fn |

`Lips` |
input, an overestimate of the Lipschitz constant of fn |

`a,b` |
input, left and right boundaries of the interval of minimization |

`iter` |
input and output, the maximum number of function evaluations, on return, the number of iterations made |

`prec` |
input and output, the desired precision in terms of the value of fn, on return the difference between best fn and the lower estimate on the minimum. If negative, the Lipschitz constant is too small |

`env` |
input, environment variable passed from R containing a reference to fn, should be defined as new.env(list(fn = myfunction)) |

### Value

A list with components

`x` |
The global minimizer of fn. |

`value` |
The final value of the function being optimized. |

`precision` |
The precision of the result in terms of the difference of value and the lower estimate on fn. |

`iterations` |
Number of function evaluations performed. |

### Author(s)

Gleb Beliakov and Gita Das

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
optimize_funcR <- function(x,y){
y <- x * x
return(y)
}
output<-Pijavski(optimize_funcR, 5, -2.0, 1.0, 1000, 10^-3,
new.env(list(fn = optimize_funcR)))
output
# named parameters
output<-Pijavski(fn= optimize_funcR, Lips=4, a=-2.0, b=1.0,
iter=1000, prec=10^-3, env=new.env(list(fn = optimize_funcR)))
output
``` |