optimization.h
945 Bytes
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
#ifndef __OPTIMIZATION_H
#define __OPTIMIZATION_H
#include "config.h"
#include "gen.h"
#include "unary.h"
#ifndef NO_NAMESPACE_GIAC
namespace giac {
#endif // ndef NO_NAMESPACE_GIAC
#define GOLDEN_RATIO 1.61803398875
typedef std::vector<int> vint;
typedef std::pair<int,int> pint;
typedef std::pair< std::vector<int>,std::map<vint,int> > diffterm;
typedef std::map<diffterm,int> impldiff;
enum {
_CPCLASS_MIN,
_CPCLASS_MAX,
_CPCLASS_POSSIBLE_MIN,
_CPCLASS_POSSIBLE_MAX,
_CPCLASS_SADDLE,
_CPCLASS_UNDECIDED
};
gen _implicitdiff(const gen & g,GIAC_CONTEXT);
gen _minimize(const gen & g,GIAC_CONTEXT);
gen _maximize(const gen & g,GIAC_CONTEXT);
gen _extrema(const gen & g,GIAC_CONTEXT);
gen _minimax(const gen & g,GIAC_CONTEXT);
gen _tpsolve(const gen & g,GIAC_CONTEXT);
gen _thiele(const gen & g,GIAC_CONTEXT);
#ifndef NO_NAMESPACE_GIAC
} // namespace giac
#endif // ndef NO_NAMESPACE_GIAC
#endif // __OPTIMIZATION_H