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_Widening_Function_inlines_hh
00025 #define PPL_Widening_Function_inlines_hh 1
00026
00027 #include "assert.hh"
00028
00029 namespace Parma_Polyhedra_Library {
00030
00031 template <typename PSET>
00032 Widening_Function<PSET>::Widening_Function(Widening_Method wm)
00033 : w_method(wm) {
00034 }
00035
00036 template <typename PSET>
00037 inline void
00038 Widening_Function<PSET>::
00039 operator()(PSET& x, const PSET& y, unsigned* tp) const {
00040 (x.*w_method)(y, tp);
00041 }
00042
00043 template <typename PSET, typename CSYS>
00044 Limited_Widening_Function<PSET, CSYS>::
00045 Limited_Widening_Function(Limited_Widening_Method lwm,
00046 const CSYS& cs)
00047 : lw_method(lwm), limiting_cs(cs) {
00048 }
00049
00050 template <typename PSET, typename CSYS>
00051 inline void
00052 Limited_Widening_Function<PSET, CSYS>::
00053 operator()(PSET& x, const PSET& y, unsigned* tp) const {
00054 (x.*lw_method)(y, limiting_cs, tp);
00055 }
00056
00058 template <typename PSET>
00059 inline Widening_Function<PSET>
00060 widen_fun_ref(void (PSET::* wm)(const PSET&, unsigned*)) {
00061 return Widening_Function<PSET>(wm);
00062 }
00063
00065 template <typename PSET, typename CSYS>
00066 inline Limited_Widening_Function<PSET, CSYS>
00067 widen_fun_ref(void (PSET::* lwm)(const PSET&, const CSYS&, unsigned*),
00068 const CSYS& cs) {
00069 return Limited_Widening_Function<PSET, CSYS>(lwm, cs);
00070 }
00071
00072 }
00073
00074
00075 #endif // !defined(PPL_Widening_Function_inlines_hh)