Commit 51a09c9d authored by Brice Videau's avatar Brice Videau
Browse files

Refactoring.

parent a6fd9a1f
......@@ -5,7 +5,7 @@ include_ccs_HEADERS = \
ccs/rng.h \
ccs/distribution.h \
ccs/hyperparameter.h \
ccs/condition.h\
ccs/expression.h\
ccs/configuration_space.h \
ccs/configuration.h
......@@ -9,7 +9,7 @@
#include "ccs/rng.h"
#include "ccs/distribution.h"
#include "ccs/hyperparameter.h"
#include "ccs/condition.h"
#include "ccs/expression.h"
#include "ccs/configuration_space.h"
#include "ccs/configuration.h"
......
......@@ -25,8 +25,6 @@ typedef struct _ccs_rng_s *ccs_rng_t;
typedef struct _ccs_distribution_s *ccs_distribution_t;
typedef struct _ccs_hyperparameter_s *ccs_hyperparameter_t;
typedef struct _ccs_expression_s *ccs_expression_t;
typedef struct _ccs_condition_s *ccs_condition_t;
typedef struct _ccs_forbidden_clause_s *ccs_forbidden_clause_t;
typedef struct _ccs_configuration_space_s *ccs_configuration_space_t;
typedef struct _ccs_configuration_s *ccs_configuration_t;
......@@ -57,8 +55,6 @@ enum ccs_object_type_e {
CCS_DISTRIBUTION,
CCS_HYPERPARAMETER,
CCS_EXPRESSION,
CCS_CONDITION,
CCS_FORBIDDEN_CLAUSE,
CCS_CONFIGURATION_SPACE,
CCS_CONFIGURATION,
CCS_OBJECT_TYPE_MAX,
......
......@@ -77,51 +77,39 @@ ccs_configuration_space_get_hyperparameters(ccs_configuration_space_t configura
extern ccs_error_t
ccs_configuration_space_add_condition(ccs_configuration_space_t configuration_space,
ccs_condition_t condition);
size_t hyperparameter_index,
ccs_expression_t expression);
extern ccs_error_t
ccs_configuration_space_add_conditions(ccs_configuration_space_t configuration_space,
size_t num_conditions,
ccs_condition_t *conditions);
extern ccs_error_t
ccs_configuration_space_get_num_conditions(ccs_configuration_space_t configuration_space,
size_t *num_conditions_ret);
extern ccs_error_t
ccs_configuration_space_get_condition(ccs_configuration_space_t configuration_space,
size_t index,
ccs_condition_t *condition_ret);
ccs_configuration_space_get_condition(ccs_configuration_space_t configuration_space,
size_t hyperparameter_index,
ccs_expression_t *expression_ret);
extern ccs_error_t
ccs_configuration_space_get_conditions(ccs_configuration_space_t configuration_space,
size_t num_conditions,
ccs_condition_t *conditions,
size_t *num_conditions_ret);
size_t num_expressions,
ccs_expression_t *expressions,
size_t *num_expressions_ret);
extern ccs_error_t
ccs_configuration_space_add_forbidden_clause(ccs_configuration_space_t configuration_space,
ccs_forbidden_clause_t forbidden_clause);
ccs_expression_t expression);
extern ccs_error_t
ccs_configuration_space_add_forbidden_clauses(ccs_configuration_space_t configuration_space,
size_t num_forbidden_clauses,
ccs_forbidden_clause_t *forbidden_clauses);
extern ccs_error_t
ccs_configuration_space_get_num_forbidden_clauses(ccs_configuration_space_t configuration_space,
size_t *num_forbidden_clauses_ret);
size_t num_expressions,
ccs_expression_t *expressions);
extern ccs_error_t
ccs_configuration_space_get_forbidden_clause(ccs_configuration_space_t configuration_space,
size_t index,
ccs_forbidden_clause_t *forbidden_clause_ret);
ccs_configuration_space_get_forbidden_clause(ccs_configuration_space_t configuration_space,
size_t hyperparameter_index,
ccs_expression_t *expression_ret);
extern ccs_error_t
ccs_configuration_space_get_forbidden_clauses(ccs_configuration_space_t configuration_space,
size_t num_forbidden_clauses,
ccs_forbidden_clause_t *forbidden_clauses,
size_t *num_forbidden_clauses_ret);
size_t num_expressions,
ccs_expression_t *expressionss,
size_t *num_expressions_ret);
// Configuration related functions
extern ccs_error_t
......@@ -165,13 +153,6 @@ ccs_configuration_space_get_unconditional_hyperparameters(ccs_configuration_spac
ccs_hyperparameter_t *hyperparameters,
size_t *num_hyperparameters_ret);
extern ccs_error_t
ccs_configuration_space_get_child_conditions_of(ccs_configuration_space_t configuration_space,
ccs_hyperparameter_t hyperparameter,
size_t num_conditions,
ccs_condition_t *conditions,
size_t *num_conditions_ret);
extern ccs_error_t
ccs_configuration_space_get_children_of(ccs_configuration_space_t configuration_space,
ccs_hyperparameter_t hyperparameter,
......@@ -179,13 +160,6 @@ ccs_configuration_space_get_children_of(ccs_configuration_space_t configuration
ccs_hyperparameter_t *hyperparameters,
size_t *num_hyperparameters_ret);
extern ccs_error_t
ccs_configuration_space_get_parent_conditions_of(ccs_configuration_space_t configuration_space,
ccs_hyperparameter_t hyperparameter,
size_t num_conditions,
ccs_condition_t *conditions,
size_t *num_conditions_ret);
extern ccs_error_t
ccs_configuration_space_get_parents_of(ccs_configuration_space_t configuration_space,
ccs_hyperparameter_t hyperparameter,
......
......@@ -88,17 +88,6 @@ ccs_expression_get_num_nodes(ccs_expression_t expression,
extern ccs_error_t
ccs_expression_get_type(ccs_expression_t expression,
ccs_expression_type_t *type_ret);
// Conditions
extern ccs_error_t
ccs_create_condition(ccs_hyperparameter_t hyperparameter,
ccs_expression_t expression,
ccs_condition_t *condition_ret);
// Forbidden Clause
extern ccs_error_t
ccs_create_forbidden_clause(ccs_hyperparameter_t hyperparameter,
ccs_expression_t expression,
ccs_forbidden_clause_t *forbidden_clause_ret);
#ifdef __cplusplus
}
......
......@@ -27,7 +27,7 @@ libcconfigspace_la_SOURCES = \
configuration_space_internal.h \
configuration.c \
configuration_internal.h \
condition.c \
condition_internal.h
expression.c \
expression_internal.h
@VALGRIND_CHECK_RULES@
#include "cconfigspace_internal.h"
#include "condition_internal.h"
#include "expression_internal.h"
#include <math.h>
#include <string.h>
......
#ifndef _CONDITION_INTERNAL_H
#define _CONDITION_INTERNAL_H
#ifndef _EXPRESSION_INTERNAL_H
#define _EXPRESSION_INTERNAL_H
struct _ccs_expression_data_s;
typedef struct _ccs_expression_data_s _ccs_expression_data_t;
......@@ -26,4 +26,4 @@ struct _ccs_expression_data_s {
ccs_datum_t *nodes;
};
#endif //_CONDITION_INTERNAL_H
#endif //_EXPRESSION_INTERNAL_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment