[GIT] ppl/ppl(pip): In PIP_Problem::clear(), do also reset the big parameter dimension.

Module: ppl/ppl Branch: pip Commit: 07821ad5d5aded366e0f556b332dbd93ec4bef7d URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=07821ad5d5ade...
Author: Enea Zaffanella zaffanella@cs.unipr.it Date: Mon Nov 23 14:17:42 2009 +0100
In PIP_Problem::clear(), do also reset the big parameter dimension. Added C language functions for getting/setting the big parameter dimension.
---
interfaces/C/ppl_c_header.h | 14 ++++++++++++++ interfaces/C/ppl_c_implementation_common.cc | 17 +++++++++++++++++ src/PIP_Problem.cc | 1 + 3 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/interfaces/C/ppl_c_header.h b/interfaces/C/ppl_c_header.h index 4bb6a18..c3e1f1e 100644 --- a/interfaces/C/ppl_c_header.h +++ b/interfaces/C/ppl_c_header.h @@ -2832,6 +2832,20 @@ int ppl_PIP_Problem_set_control_parameter PPL_PROTO((ppl_PIP_Problem_t pip, int value));
+/*! \relates ppl_PIP_Problem_tag \brief + Writes into \p *pd the big parameter dimension of PIP problem \p pip. +*/ +int +ppl_PIP_Problem_get_big_parameter_dimension +PPL_PROTO((ppl_const_PIP_Problem_t pip, ppl_dimension_type* pd)); + +/*! \relates ppl_PIP_Problem_tag \brief + Sets the big parameter dimension of PIP problem \p pip to \p d. +*/ +int +ppl_PIP_Problem_set_big_parameter_dimension +PPL_PROTO((ppl_PIP_Problem_t pip, ppl_dimension_type d)); + /*@}*/ /* Querying/Setting Control Parameters */
diff --git a/interfaces/C/ppl_c_implementation_common.cc b/interfaces/C/ppl_c_implementation_common.cc index 3aea5d8..ad5440e 100644 --- a/interfaces/C/ppl_c_implementation_common.cc +++ b/interfaces/C/ppl_c_implementation_common.cc @@ -2290,6 +2290,23 @@ ppl_PIP_Problem_set_control_parameter(ppl_PIP_Problem_t pip, CATCH_ALL
int +ppl_PIP_Problem_get_big_parameter_dimension(ppl_const_PIP_Problem_t pip, + ppl_dimension_type* pd) try { + *pd = to_const(pip)->get_big_parameter_dimension(); + return 0; +} +CATCH_ALL + +int +ppl_PIP_Problem_set_big_parameter_dimension(ppl_PIP_Problem_t pip, + ppl_dimension_type d) try { + to_nonconst(pip)->set_big_parameter_dimension(d); + return 0; +} +CATCH_ALL + + +int ppl_PIP_Tree_Node_as_solution(ppl_const_PIP_Tree_Node_t spip_tree, ppl_const_PIP_Solution_Node_t* dpip_tree) try { *dpip_tree = to_const(to_const(spip_tree)->as_solution()); diff --git a/src/PIP_Problem.cc b/src/PIP_Problem.cc index cf19147..6f4c01c 100644 --- a/src/PIP_Problem.cc +++ b/src/PIP_Problem.cc @@ -447,6 +447,7 @@ PPL::PIP_Problem::clear() { parameters.clear(); initial_context.clear(); control_parameters_init(); + big_parameter_dimension = 0; }
void
participants (1)
-
Enea Zaffanella