00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef PPL_PIP_Problem_inlines_hh
00025 #define PPL_PIP_Problem_inlines_hh 1
00026
00027 namespace Parma_Polyhedra_Library {
00028
00029 inline dimension_type
00030 PIP_Problem::space_dimension() const {
00031 return external_space_dim;
00032 }
00033
00034 inline dimension_type
00035 PIP_Problem::max_space_dimension() {
00036 return Constraint::max_space_dimension();
00037 }
00038
00039 inline PIP_Problem::const_iterator
00040 PIP_Problem::constraints_begin() const {
00041 return input_cs.begin();
00042 }
00043
00044 inline PIP_Problem::const_iterator
00045 PIP_Problem::constraints_end() const {
00046 return input_cs.end();
00047 }
00048
00049 inline const Variables_Set&
00050 PIP_Problem::parameter_space_dimensions() const {
00051 return parameters;
00052 }
00053
00054 inline void
00055 PIP_Problem::swap(PIP_Problem& y) {
00056 std::swap(external_space_dim, y.external_space_dim);
00057 std::swap(internal_space_dim, y.internal_space_dim);
00058 std::swap(status, y.status);
00059 std::swap(current_solution, y.current_solution);
00060 std::swap(input_cs, y.input_cs);
00061 std::swap(first_pending_constraint, y.first_pending_constraint);
00062 std::swap(parameters, y.parameters);
00063 std::swap(initial_context, y.initial_context);
00064 for (dimension_type i = CONTROL_PARAMETER_NAME_SIZE; i-- > 0; )
00065 std::swap(control_parameters[i], y.control_parameters[i]);
00066 std::swap(big_parameter_dimension, y.big_parameter_dimension);
00067 }
00068
00069 inline PIP_Problem&
00070 PIP_Problem::operator=(const PIP_Problem& y) {
00071 PIP_Problem tmp(y);
00072 swap(tmp);
00073 return *this;
00074 }
00075
00076 inline PIP_Problem::Control_Parameter_Value
00077 PIP_Problem::get_control_parameter(Control_Parameter_Name n) const {
00078 PPL_ASSERT(n >= 0 && n < CONTROL_PARAMETER_NAME_SIZE);
00079 return control_parameters[n];
00080 }
00081
00082 inline dimension_type
00083 PIP_Problem::get_big_parameter_dimension() const {
00084 return big_parameter_dimension;
00085 }
00086
00087 }
00088
00089 namespace std {
00090
00092 inline void
00093 swap(Parma_Polyhedra_Library::PIP_Problem& x,
00094 Parma_Polyhedra_Library::PIP_Problem& y) {
00095 x.swap(y);
00096 }
00097
00098 }
00099
00100 #endif // !defined(PPL_PIP_Problem_inlines_hh)