-
Notifications
You must be signed in to change notification settings - Fork 0
/
tr_optim.h
36 lines (29 loc) · 1.44 KB
/
tr_optim.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// Created by nlw on 25/09/15.
//
#ifndef FILTERSQP_LM_OPTIM_H
#define FILTERSQP_LM_OPTIM_H
#include <iostream>
#include <iomanip>
#include <gsl/gsl_linalg.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_eigen.h>
#include <gsl/gsl_vector_double.h>
#include <gsl/gsl_matrix_double.h>
#include "find_root.h"
double *trust_region_optimization(void (*function)(double *, double *, double *, double *), int dim, double *xx0,
double step_size = 0.001, double step_limit = 1e-10, int max_iterations = 10000);
gsl_vector *rec_trust_region_optimization(void (*function)(double *, double *, double *, double *),
gsl_vector *xx,
gsl_vector *yy,
gsl_vector *grad,
gsl_matrix *hess,
gsl_vector *xx_hess,
gsl_vector *yy_hess,
gsl_vector *grad_hess,
gsl_matrix *hess_hess,
int iteration,
double step_size, double step_limit, int max_iterations);
void trust_region_step(gsl_vector *grad, gsl_matrix *hess, gsl_vector *xxStep, double rho);
ostream & operator<<(ostream& os, const gsl_vector *vec);
#endif //FILTERSQP_LM_OPTIM_H