objective_space.h 3.76 KB
Newer Older
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
#ifndef _CCS_OBJECTIVE_SPACE
#define _CCS_OBJECTIVE_SPACE

#ifdef __cplusplus
extern "C" {
#endif

enum ccs_objective_type_e {
	CCS_MINIMIZE,
	CCS_MAXIMIZE,
	CCS_OBJECTIVE_TYPE_MAX,
	CCS_OBJECTIVE_TYPE_FORCE_32BIT = INT_MAX
};

typedef enum ccs_objective_type_e ccs_objective_type_t;

extern ccs_error_t
ccs_create_objective_space(const char            *name,
                           void                  *user_data,
                           ccs_objective_space_t *objective_space_ret);

extern ccs_error_t
ccs_objective_space_get_name(ccs_objective_space_t   objective_space,
                             const char            **name_ret);

extern ccs_error_t
ccs_objective_space_get_user_data(ccs_objective_space_t   objective_space,
                                  void                  **user_data_ret);

extern ccs_error_t
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
ccs_objective_space_add_hyperparameter(ccs_objective_space_t objective_space,
                                       ccs_hyperparameter_t  hyperparameter);

extern ccs_error_t
ccs_objective_space_add_hyperparameters(ccs_objective_space_t  objective_space,
                                        size_t                 num_hyperparameters,
                                        ccs_hyperparameter_t  *hyperparameters);

extern ccs_error_t
ccs_objective_space_get_num_hyperparameters(
		ccs_objective_space_t  objective_space,
		size_t                *num_hyperparameters_ret);

extern ccs_error_t
ccs_objective_space_get_hyperparameter(ccs_objective_space_t  objective_space,
                                       size_t                 index,
                                       ccs_hyperparameter_t  *hyperparameter_ret);

extern ccs_error_t
ccs_objective_space_get_hyperparameter_by_name(
		ccs_objective_space_t  objective_space,
		const char *           name,
		ccs_hyperparameter_t  *hyperparameter_ret);

extern ccs_error_t
ccs_objective_space_get_hyperparameter_index_by_name(
		ccs_objective_space_t  objective_space,
		const char            *name,
		size_t                *index_ret);

extern ccs_error_t
ccs_objective_space_get_hyperparameter_index(
		ccs_objective_space_t  objective_space,
		ccs_hyperparameter_t   hyperparameter,
		size_t                *index_ret);

extern ccs_error_t
ccs_objective_space_get_hyperparameters(ccs_objective_space_t  objective_space,
                                        size_t                 num_hyperparameters,
                                        ccs_hyperparameter_t  *hyperparameters,
                                        size_t                *num_hyperparameters_ret);
72
73
74

extern ccs_error_t
ccs_objective_space_add_objective(ccs_objective_space_t objective_space,
75
                                  ccs_expression_t      expression,
76
77
                                  ccs_objective_type_t  type);

78
79
80
81
82
83
extern ccs_error_t
ccs_objective_space_add_objectives(ccs_objective_space_t  objective_space,
                                   size_t                 num_objectives,
                                   ccs_expression_t      *expressions,
                                   ccs_objective_type_t  *types);

Brice Videau's avatar
Brice Videau committed
84
85
extern ccs_error_t
ccs_objective_space_get_objective(ccs_objective_space_t  objective_space,
86
87
                                  size_t                 index,
                                  ccs_expression_t      *expression_ret,
Brice Videau's avatar
Brice Videau committed
88
                                  ccs_objective_type_t  *type_ret);
89
90
91
92
93
94
extern ccs_error_t
ccs_objective_space_get_objectives(ccs_objective_space_t  objective_space,
                                   size_t                 num_objectives,
                                   ccs_expression_t      *expressions,
                                   ccs_objective_type_t  *types,
                                   size_t                *num_objectives_ret);
Brice Videau's avatar
Brice Videau committed
95

96
97
98
99
100
#ifdef __cplusplus
}
#endif

#endif //_CCS_OBJECTIVE_SPACE