8 LPContext::Data::Data(
const std::vector<Variable>& v) : variable_order(v) {
9 lp_var_order = lp_variable_order_new();
11 lp_context = (lp_polynomial_context_t*) malloc(
sizeof(lp_polynomial_context_t));
13 lp_context->ref_count = 0;
14 lp_context->var_db = LPVariables::getInstance().lp_var_db;
16 lp_context->var_order = lp_var_order;
17 #define TEMP_VARIABLE_SIZE 10
18 lp_context->var_tmp = (lp_variable_t*)malloc(
sizeof(lp_variable_t)*TEMP_VARIABLE_SIZE);
19 for (
size_t i = 0; i < TEMP_VARIABLE_SIZE; ++ i) {
20 lp_context->var_tmp[i] = LPVariables::getInstance().lp_var_tmp[i];
22 lp_context->var_tmp_size = 0;
23 lp_polynomial_context_attach(lp_context);
26 LPContext::Data::~Data() {
27 lp_variable_order_detach(lp_var_order);
28 lp_polynomial_context_detach(lp_context);
carl is the main namespace for the library.