1 #ifndef PhysicsTools_Utilities_Factorize_h
2 #define PhysicsTools_Utilities_Factorize_h
8 #include <boost/type_traits.hpp>
9 #include <boost/integer/common_factor.hpp>
10 #include <boost/mpl/and.hpp>
11 #include <boost/mpl/not.hpp>
12 #include <boost/mpl/int.hpp>
13 #include <boost/mpl/if.hpp>
21 static const bool value =
false;
27 TEMPL(T2)
struct Divides :
public Divides0<A> {};
35 static const bool value =
true;
51 static const bool value =
true;
53 static const int p = ::boost::mpl::if_c<(n < m), ::boost::mpl::int_<n>, ::boost::mpl::int_<m> >
::type::value;
67 template <
int n,
bool positive = (n >= 0)>
81 static const bool value = (gcd != 1);
88 static const bool value =
true;
99 typedef Divides<A, B>
Div;
107 typedef Divides<A, B>
Div;
124 typedef Divides<arg, void>
D0;
125 typedef Divides<arg, B>
D1;
126 typedef Divides<arg, C>
D2;
135 typedef Divides<arg, void>
D0;
136 typedef Divides<A, C>
D1;
137 typedef Divides<B, C>
D2;
147 typedef Divides<arg, void>
D0;
148 typedef Divides<arg, C>
D1;
149 typedef Divides<arg, D>
D2;
178 return f * ((_1 /
f) + (_2 /
f));