7 assert(k > 1 && k < 7);
12 for (u32 i = 1; i < m+1; i++) {
17 Q << 1.0 << 1.0 << 1.0 << 1.0 << 1.0;
21 at(1, 0) = -11.0/12.0;
28 at(m, m-1) = -17.0/24.0;
29 at(m, m-2) = -3.0/8.0;
30 at(m, m-3) = 5.0/24.0;
31 at(m, m-4) = -1.0/24.0;
33 for (u32 i = 2; i < m; i++) {
34 at(i, i-2) = 1.0/24.0;
35 at(i, i-1) = -9.0/8.0;
37 at(i, i+1) = -1.0/24.0;
41 Q << 2186.0/1943.0 << 2125.0/2828.0 << 1441.0/1240.0 << 648.0/673.0
42 << 349.0/350.0 << 648.0/673.0 << 1441.0/1240.0 << 2125.0/2828.0
47 at(1, 0) = -1627.0/1920.0;
48 at(1, 1) = 211.0/640.0;
50 at(1, 3) = -235.0/192.0;
51 at(1, 4) = 91.0/128.0;
52 at(1, 5) = -443.0/1920.0;
53 at(1, 6) = 31.0/960.0;
54 at(2, 0) = 31.0/960.0;
55 at(2, 1) = -687.0/640.0;
56 at(2, 2) = 129.0/128.0;
57 at(2, 3) = 19.0/192.0;
59 at(2, 5) = 21.0/640.0;
60 at(2, 6) = -3.0/640.0;
62 at(m, m) = 1627.0/1920.0;
63 at(m, m-1) = -211.0/640.0;
64 at(m, m-2) = -59.0/48.0;
65 at(m, m-3) = 235.0/192.0;
66 at(m, m-4) = -91.0/128.0;
67 at(m, m-5) = 443.0/1920.0;
68 at(m, m-6) = -31.0/960.0;
69 at(m-1, m) = -31.0/960.0;
70 at(m-1, m-1) = 687.0/640.0;
71 at(m-1, m-2) = -129.0/128.0;
72 at(m-1, m-3) = -19.0/192.0;
73 at(m-1, m-4) = 3.0/32.0;
74 at(m-1, m-5) = -21.0/640.0;
75 at(m-1, m-6) = 3.0/640.0;
77 for (u32 i = 3; i < m-1; i++) {
78 at(i, i-3) = -3.0/640.0;
79 at(i, i-2) = 25.0/384.0;
80 at(i, i-1) = -75.0/64.0;
82 at(i, i+1) = -25.0/384.0;
83 at(i, i+2) = 3.0/640.0;
86 Q << 2383.0/2005.0 << 929.0/2002.0 << 887.0/531.0 << 3124.0/5901.0
87 << 1706.0/1457.0 << 457.0/467.0 << 1057.0/1061.0 << 457.0/467.0
88 << 1706.0/1457.0 << 3124.0/5901.0 << 887.0/531.0 << 929.0/2002.0
132 sp_mat Im = speye(m+2, m+2);
133 sp_mat In = speye(n+2, n+2);
134 sp_mat Io = speye(o+2, o+2);
148 if ((m != n) || (n != o))
154 A1(0, 0) = A2(0, 1) = A3(0, 2) = 1.0;