-
Notifications
You must be signed in to change notification settings - Fork 1
/
nmsimplex.h
43 lines (34 loc) · 815 Bytes
/
nmsimplex.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
37
38
39
40
41
42
/*
* File: nmsimplex.h
* Author: juanc_000
*
* Created on 31 de diciembre de 2014, 08:52 AM
*/
#ifndef NMSIMPLEX_H
#define NMSIMPLEX_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
typedef struct{
void (*ConstraintFcn)(double*, size_t); //ConstraintFunction
unsigned long MaxIterations;
double alpha; // Reflection
double beta; // Contraction
double gamma; // Expansion
double delta; // Shrinkage
double epsilon;
double InitSimplexscale;
int FcnEvaluations;
int Iterations;
int n;
double (*objfunc)(double*);
}nmsimplex_data_t;
double nmsimplex(nmsimplex_data_t *obj, double (*objfunc)(double*), double *seed, size_t n);
#ifdef __cplusplus
}
#endif
#endif /* NMSIMPLEX_H */