| 122 | |
| 123 | |
| 124 | void demo_setInlineCompMatr() { |
| 125 | |
| 126 | // inline literal; identical to setCompMatr() for consistencty with C API |
| 127 | CompMatr a = createCompMatr(1); |
| 128 | setInlineCompMatr(a, 1, {{.3,.4},{.6,.7}}); |
| 129 | reportCompMatr(a); |
| 130 | destroyCompMatr(a); |
| 131 | |
| 132 | // we must specify all elements (only necessary in C++) |
| 133 | CompMatr b = createCompMatr(3); |
| 134 | setInlineCompMatr(b, 3, { |
| 135 | {1,2,3,4,5,6,7,8}, |
| 136 | {8_i,7_i,6_i,5_i,0,0,0,0}, |
| 137 | {0,0,0,0,9,9,9,9}, |
| 138 | {8,7,6,5,4,3,2,1}, |
| 139 | {3,3,3,3,3,3,3,3}, |
| 140 | {0,0,0,0,1_i,1_i,1_i,1_i}, |
| 141 | {9,8,7,6,5,4,3,2}, |
| 142 | {-1,-2,-3,-4,4,3,2,1} |
| 143 | }); |
| 144 | reportCompMatr(b); |
| 145 | destroyCompMatr(b); |
| 146 | } |
| 147 | |
| 148 | |
| 149 | void demo_setCompMatr() { |
no test coverage detected