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

Function applyreflectionfromtheright

src/reflections.cpp:259–283  ·  view source on GitHub ↗

Application of an elementary reflection to a rectangular matrix of size MxN The algorithm post-multiplies the matrix by an elementary reflection transformation which is given by column V and scalar Tau (see the description of the GenerateReflection procedure). Not the whole matrix but only a part of it is transformed (rows from M1 to M2, columns from N1 to N2). Only the elements of this submatrix

Source from the content-addressed store, hash-verified

257 September 30, 1994
258*************************************************************************/
259void applyreflectionfromtheright(ap::real_2d_array& c,
260 double tau,
261 const ap::real_1d_array& v,
262 int m1,
263 int m2,
264 int n1,
265 int n2,
266 ap::real_1d_array& work)
267{
268 double t;
269 int i;
270 int vm;
271
272 if( ap::fp_eq(tau,0)||n1>n2||m1>m2 )
273 {
274 return;
275 }
276 vm = n2-n1+1;
277 for(i = m1; i <= m2; i++)
278 {
279 t = ap::vdotproduct(&c(i, n1), 1, &v(1), 1, ap::vlen(n1,n2));
280 t = t*tau;
281 ap::vsub(&c(i, n1), 1, &v(1), 1, ap::vlen(n1,n2), t);
282 }
283}
284
285
286

Callers 8

rmatrixlqFunction · 0.85
rmatrixlqunpackqFunction · 0.85
rmatrixbdFunction · 0.85
rmatrixbdmultiplybyqFunction · 0.85
rmatrixbdmultiplybypFunction · 0.85
rmatrixhessenbergFunction · 0.85
rmatrixhessenbergunpackqFunction · 0.85
rmatrixlqbasecaseFunction · 0.85

Calls 2

vdotproductFunction · 0.85
vsubFunction · 0.85

Tested by

no test coverage detected