00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef PPL_Widening_Function_inlines_hh
00024 #define PPL_Widening_Function_inlines_hh 1
00025
00026 #include <cassert>
00027
00028 namespace Parma_Polyhedra_Library {
00029
00030 template <typename PH>
00031 Widening_Function<PH>::Widening_Function(Widening_Method wm)
00032 : w_method(wm) {
00033 }
00034
00035 template <typename PH>
00036 inline void
00037 Widening_Function<PH>::
00038 operator()(PH& x, const PH& y, unsigned* tp) const {
00039 (x.*w_method)(y, tp);
00040 }
00041
00042 template <typename PH, typename CS>
00043 Limited_Widening_Function<PH, CS>::
00044 Limited_Widening_Function(Limited_Widening_Method lwm,
00045 const CS& cs)
00046 : lw_method(lwm), limiting_cs(cs) {
00047 }
00048
00049 template <typename PH, typename CS>
00050 inline void
00051 Limited_Widening_Function<PH, CS>::
00052 operator()(PH& x, const PH& y, unsigned* tp) const {
00053 (x.*lw_method)(y, limiting_cs, tp);
00054 }
00055
00057 template <typename PH>
00058 inline Widening_Function<PH>
00059 widen_fun_ref(void (PH::* wm)(const PH&, unsigned*)) {
00060 return Widening_Function<PH>(wm);
00061 }
00062
00064 template <typename PH, typename CS>
00065 inline Limited_Widening_Function<PH, CS>
00066 widen_fun_ref(void (PH::* lwm)(const PH&, const CS&, unsigned*),
00067 const CS& cs) {
00068 return Limited_Widening_Function<PH, CS>(lwm, cs);
00069 }
00070
00071 }
00072
00073
00074 #endif // !defined(PPL_Widening_Function_inlines_hh)