#include <interpol.h>
|
| Interpol (u32 m, Real c) |
|
| Interpol (u32 m, u32 n, Real c1, Real c2) |
|
| Interpol (u32 m, u32 n, u32 o, Real c1, Real c2, Real c3) |
|
| Interpol (bool type, u32 m, Real c) |
|
| Interpol (bool type, u32 m, u32 n, Real c1, Real c2) |
|
| Interpol (bool type, u32 m, u32 n, u32 o, Real c1, Real c2, Real c3) |
|
Definition at line 7 of file interpol.h.
◆ Interpol() [1/6]
Interpol::Interpol |
( |
u32 | m, |
|
|
Real | c ) |
Definition at line 4 of file interpol.cpp.
4 : sp_mat(m+1, m+2)
5{
6 assert(m >= 4);
7 assert(c >= 0 && c <= 1);
8
9 at(0, 0) = 1;
10 at(m, m+1) = 1;
11
12 for (u32 i = 1; i < m; i++) {
13 at(i, i) = c;
14 at(i, i+1) = 1-c;
15 }
16}
◆ Interpol() [2/6]
Interpol::Interpol |
( |
u32 | m, |
|
|
u32 | n, |
|
|
Real | c1, |
|
|
Real | c2 ) |
Definition at line 19 of file interpol.cpp.
20{
23
24 sp_mat Im = speye(m+2, m+2);
25 sp_mat In = speye(n+2, n+2);
26
27 Im.shed_row(0);
28 Im.shed_row(m);
29 In.shed_row(0);
30 In.shed_row(n);
31
34
35
36 if (m != n)
38 else {
39 sp_mat A1(2, 1);
40 sp_mat A2(2, 1);
41 A1(0, 0) = A2(1, 0) = 1.0;
43 }
44}
static sp_mat spjoin_cols(const sp_mat &A, const sp_mat &B)
static sp_mat spkron(const sp_mat &A, const sp_mat &B)
◆ Interpol() [3/6]
Interpol::Interpol |
( |
u32 | m, |
|
|
u32 | n, |
|
|
u32 | o, |
|
|
Real | c1, |
|
|
Real | c2, |
|
|
Real | c3 ) |
Definition at line 47 of file interpol.cpp.
48{
52
53 sp_mat Im = speye(m+2, m+2);
54 sp_mat In = speye(n+2, n+2);
55 sp_mat Io = speye(o+2, o+2);
56
57 Im.shed_row(0);
58 Im.shed_row(m);
59 In.shed_row(0);
60 In.shed_row(n);
61 Io.shed_row(0);
62 Io.shed_row(o);
63
67
68
69 if ((m != n) || (n != o))
71 else {
72 sp_mat A1(3, 1);
73 sp_mat A2(3, 1);
74 sp_mat A3(3, 1);
75 A1(0, 0) = A2(1, 0) = A3(2, 0) = 1.0;
77 }
78}
◆ Interpol() [4/6]
Interpol::Interpol |
( |
bool | type, |
|
|
u32 | m, |
|
|
Real | c ) |
Definition at line 81 of file interpol.cpp.
81 : sp_mat(m+2, m+1)
82{
83 assert(m >= 4 && "m >= 4");
84 assert(c >= 0 && c <= 1 && "0 <= c <= 1");
85
86 at(0, 0) = 1;
87 at(m+2 - 1, m+1 - 1) = 1;
88
89 vec avg = {c, 1 - c};
90
91 int j = 0;
92 for (int i = 1; i < m+1; ++i) {
93 at(i, j) = avg(0);
94 at(i, j + 1) = avg(1);
95 j++;
96 }
97}
◆ Interpol() [5/6]
Interpol::Interpol |
( |
bool | type, |
|
|
u32 | m, |
|
|
u32 | n, |
|
|
Real | c1, |
|
|
Real | c2 ) |
Definition at line 100 of file interpol.cpp.
101{
104
105 sp_mat Im(m + 2, m);
106 Im.submat(1, 0, m, m-1) = speye(m, m);
107
108 sp_mat In(n + 2, n);
109 In.submat(1, 0, n, n-1) = speye(n, n);
110
113
115}
static sp_mat spjoin_rows(const sp_mat &A, const sp_mat &B)
◆ Interpol() [6/6]
Interpol::Interpol |
( |
bool | type, |
|
|
u32 | m, |
|
|
u32 | n, |
|
|
u32 | o, |
|
|
Real | c1, |
|
|
Real | c2, |
|
|
Real | c3 ) |
Definition at line 118 of file interpol.cpp.
119{
123
124 sp_mat Im(m + 2, m);
125 Im.submat(1, 0, m, m-1) = speye(m, m);
126
127 sp_mat In(n + 2, n);
128 In.submat(1, 0, n, n-1) = speye(n, n);
129
130 sp_mat Io(o + 2, o);
131 Io.submat(1, 0, o, o-1) = speye(o, o);
132
136
138}
The documentation for this class was generated from the following files: