1 #ifndef PhysicsTools_Utilities_Primitive_h 2 #define PhysicsTools_Utilities_Primitive_h 28 template <
typename X,
typename F>
31 inline static type get(
const F&
f) {
return f *
X(); }
34 template <
typename F,
typename X = no_var>
40 template <
typename X,
typename F>
66 pow(
_._1, num<n + 1>()) / num<n + 1>());
74 num<-1>() / (num<n - 1>() *
pow(
_._2._1, num<n - 1>())));
79 num<-1>() / (num<n - 1>() *
pow(
_._1._2, num<n - 1>())));
87 (fract<m, n + m>() *
pow(
_._1, fract<n + m, m>())));
172 B1
b = primitive<X>(
_._2);
173 return a *
b - primitive<X>(derivative<X>(
a) *
b);
184 B1
b = primitive<X>(
_._1);
185 return a *
b - primitive<X>(derivative<X>(
a) *
b);
189 TEMPL(XT2)
struct PartIntegral<
X,
A,
B,
true,
true> :
public PartIntegral<X, A, B, true, false> {};
209 TEMPL(XT2)
struct Primitive<
PROD_S(
A,
B),
X> :
public ProductPrimitive<X, A, B> {};
230 B1
b = primitive<X>(num<1>() /
_._2);
231 return a *
b - primitive<X>(derivative<X>(
a) *
b);
242 B1
b = primitive<X>(num<1>() /
_._2);
243 return a *
b - primitive<X>(derivative<X>(
a) *
b);
283 #define DECLARE_PRIMITIVE(X, F, P) \ 285 template <typename X> \ 286 struct Primitive<F, X> { \ 288 inline static type get(const F& _) { return type(_._); } \ 291 struct __useless_ignoreme 293 #define DECLARE_FUNCT_PRIMITIVE(F, P) \ 296 struct Primitive<F> { \ 298 inline static type get(const F& _) { return type(); } \ 301 struct __useless_ignoreme
typedef POWER(A, NUM(n)) arg
Sin< T >::type sin(const T &t)
TEMPL(T2) struct Divides B
Primitive< F, X >::type primitive(const F &f)
GET(PROD_S(A, B), type())
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
typedef PRIMIT(X, PROD(A1, B1)) AB1
Product< Parameter, Identity >::type type
static type get(const F &f)
Log< T >::type log(const T &t)
TEMPL(T1) struct Divides0
typedef PROD(F, SUM(RATIO(A, F), RATIO(B, F))) type
PRIMIT_RULE(TYPXT2, POWER_S(A, B), UndefinedIntegral, type())
typedef DIFF(PROD(A, B1), PRIMIT(X, PROD(A1, B1))) type
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
GET(RATIO_S(A, B), type())
Power< A, B >::type pow(const A &a, const B &b)