| 122 | |
| 123 | |
| 124 | double upperhessenberg1norm(const ap::real_2d_array& a, |
| 125 | int i1, |
| 126 | int i2, |
| 127 | int j1, |
| 128 | int j2, |
| 129 | ap::real_1d_array& work) |
| 130 | { |
| 131 | double result; |
| 132 | int i; |
| 133 | int j; |
| 134 | |
| 135 | ap::ap_error::make_assertion(i2-i1==j2-j1, "UpperHessenberg1Norm: I2-I1<>J2-J1!"); |
| 136 | for(j = j1; j <= j2; j++) |
| 137 | { |
| 138 | work(j) = 0; |
| 139 | } |
| 140 | for(i = i1; i <= i2; i++) |
| 141 | { |
| 142 | for(j = ap::maxint(j1, j1+i-i1-1); j <= j2; j++) |
| 143 | { |
| 144 | work(j) = work(j)+fabs(a(i,j)); |
| 145 | } |
| 146 | } |
| 147 | result = 0; |
| 148 | for(j = j1; j <= j2; j++) |
| 149 | { |
| 150 | result = ap::maxreal(result, work(j)); |
| 151 | } |
| 152 | return result; |
| 153 | } |
| 154 | |
| 155 | |
| 156 | void copymatrix(const ap::real_2d_array& a, |
nothing calls this directly
no outgoing calls
no test coverage detected