|
| v0.14.0
|
Go to the documentation of this file.
23 #ifndef PHG_QUAD_PERMU_H
28 #define Perm1(a) _F(1.0)
31 #define Cons1(a) Perm1(a)
39 #define Perm2(a) _F(0.5),_F(0.5)
41 #define Perm11(a) _F(a),_F(1.)-(_F(a)), _F(1.)-(_F(a)),_F(a)
42 #define Dup11(w) _F(w),_F(w)
44 #define Cons2(a) Perm2(a)
45 #define Cons11(a) Perm11(a)
49 #define Perm20(a) _F(a),_F(1.)-(_F(a))
52 #define Perm3(a) _F(1.)/_F(3.),_F(1.)/_F(3.),_F(1.)/_F(3.)
54 #define Perm21(a) _F(1.)-(_F(a))-(_F(a)),_F(a),_F(a), \
55 _F(a),_F(1.)-(_F(a))-(_F(a)),_F(a), \
56 _F(a),_F(a),_F(1.)-(_F(a))-(_F(a))
57 #define Dup21(w) _F(w),_F(w),_F(w)
58 #define Perm111(a,b) _F(a),_F(b),_F(1.)-(_F(a))-(_F(b)), \
59 _F(a),_F(1.)-(_F(a))-(_F(b)),_F(b), \
60 _F(b),_F(a),_F(1.)-(_F(a))-(_F(b)), \
61 _F(b),_F(1.)-(_F(a))-(_F(b)),_F(a), \
62 _F(1.)-(_F(a))-(_F(b)),_F(a),_F(b), \
63 _F(1.)-(_F(a))-(_F(b)),_F(b),_F(a)
64 #define Dup111(w) _F(w),_F(w),_F(w),_F(w),_F(w),_F(w)
66 #define Cons3(a) Perm3(a)
67 #define Cons21(a) Perm21(a)
68 #define Cons111(a,b) Perm111(a,b)
72 #define Perm30(a,b) _F(a),_F(b),_F(1.)-(_F(a))-(_F(b))
75 #define Perm4(a) _F(0.25),_F(0.25),_F(0.25),_F(0.25)
77 #define Perm31(a) _F(1.)-_F(3.)*(_F(a)),_F(a),_F(a),_F(a), \
78 _F(a),_F(1.)-_F(3.)*(_F(a)),_F(a),_F(a), \
79 _F(a),_F(a),_F(1.)-_F(3.)*(_F(a)),_F(a), \
80 _F(a),_F(a),_F(a),_F(1.)-_F(3.)*(_F(a))
81 #define Dup31(w) _F(w),_F(w),_F(w),_F(w)
82 #define Perm22(a) _F(a),_F(a),_F(.5)-(_F(a)),_F(.5)-(_F(a)), \
83 _F(a),_F(.5)-(_F(a)),_F(a),_F(.5)-(_F(a)), \
84 _F(a),_F(.5)-(_F(a)),_F(.5)-(_F(a)),_F(a), \
85 _F(.5)-(_F(a)),_F(a),_F(.5)-(_F(a)),_F(a), \
86 _F(.5)-(_F(a)),_F(a),_F(a),_F(.5)-(_F(a)), \
87 _F(.5)-(_F(a)),_F(.5)-(_F(a)),_F(a),_F(a)
88 #define Dup22(w) _F(w),_F(w),_F(w),_F(w),_F(w),_F(w)
89 #define Perm211(a,b) _F(a),_F(a),_F(b),_F(1.)-(_F(a))-(_F(a))-(_F(b)), \
90 _F(a),_F(a),_F(1.)-(_F(a))-(_F(a))-(_F(b)),_F(b), \
91 _F(a),_F(b),_F(a),_F(1.)-(_F(a))-(_F(a))-(_F(b)), \
92 _F(a),_F(b),_F(1.)-(_F(a))-(_F(a))-(_F(b)),_F(a), \
93 _F(a),_F(1.)-(_F(a))-(_F(a))-(_F(b)),_F(a),_F(b), \
94 _F(a),_F(1.)-(_F(a))-(_F(a))-(_F(b)),_F(b),_F(a), \
95 _F(b),_F(a),_F(a),_F(1.)-(_F(a))-(_F(a))-(_F(b)), \
96 _F(b),_F(a),_F(1.)-(_F(a))-(_F(a))-(_F(b)),_F(a), \
97 _F(b),_F(1.)-(_F(a))-(_F(a))-(_F(b)),_F(a),_F(a), \
98 _F(1.)-(_F(a))-(_F(a))-(_F(b)),_F(a),_F(a),_F(b), \
99 _F(1.)-(_F(a))-(_F(a))-(_F(b)),_F(a),_F(b),_F(a), \
100 _F(1.)-(_F(a))-(_F(a))-(_F(b)),_F(b),_F(a),_F(a)
101 #define Dup211(w) _F(w),_F(w),_F(w),_F(w),_F(w),_F(w),\
102 _F(w),_F(w),_F(w),_F(w),_F(w),_F(w)
103 #define Perm0111(p,a,b,c) p,a,b,c, p,a,c,b, p,b,a,c, p,b,c,a, p,c,a,b, p,c,b,a
104 #define Perm1111(a,b,c) \
105 Perm0111(_F(a),_F(b),_F(c),_F(1.)-(_F(a))-(_F(b))-(_F(c))), \
106 Perm0111(_F(b),_F(a),_F(c),_F(1.)-(_F(a))-(_F(b))-(_F(c))), \
107 Perm0111(_F(c),_F(a),_F(b),_F(1.)-(_F(a))-(_F(b))-(_F(c))), \
108 Perm0111(_F(1.)-(_F(a))-(_F(b))-(_F(c)),_F(a),_F(b),_F(c))
109 #define Dup1111(w) Dup111(w), Dup111(w), Dup111(w), Dup111(w)
111 #define Cons4(a) Perm4(a)
112 #define Cons31(a) Perm31(a)
113 #define Cons22(a) Perm22(a)
114 #define Cons211(a,b) Perm211(a,b)
115 #define Cons1111(a,b,c) Perm111(a,b,c)
119 #define Perm40(a,b,c) _F(a),_F(b),_F(c),_F(1.)-(_F(a))-(_F(b))-(_F(c))
121 #define PHG_QUAD_PERMU_H