MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / upperhessenberg1norm

Function upperhessenberg1norm

src/blas.cpp:124–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122
123
124double 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
156void copymatrix(const ap::real_2d_array& a,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected