ip.h
717 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
/*
* Copyright (C) 2012 Kengo Sato
*
* This file comes from DAFS.
*
*/
#ifndef __INC_IP_H__
#define __INC_IP_H__
class IPimpl;
class IP
{
public:
typedef enum {MIN, MAX} DirType;
typedef enum {FR, LO, UP, DB, FX} BoundType;
public:
IP();
IP(DirType dir, int n_th);
~IP();
int make_variable(double coef);
int make_variable_r(double coef);
int make_variable(double coef, int lo, int hi);
int make_constraint(BoundType bnd, double l, double u);
void add_constraint(int row, int col, double val);
void chg_constraint(int row, BoundType bnd, double l, double u);
void update();
int solve();
double get_value(int col);// const;
double get_obj();
private:
IPimpl* impl_;
};
#endif