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

Function cmatrixrank1

src/ablas.cpp:431–457  ·  view source on GitHub ↗

Rank-1 correction: A := A + u*v' INPUT PARAMETERS: M - number of rows N - number of columns A - target matrix, MxN submatrix is updated IA - submatrix offset (row index) JA - submatrix offset (column index) U - vector #1 IU - subvector offset V - vector #2 IV - subvector offset ****************************************************

Source from the content-addressed store, hash-verified

429 IV - subvector offset
430*************************************************************************/
431void cmatrixrank1(int m,
432 int n,
433 ap::complex_2d_array& a,
434 int ia,
435 int ja,
436 ap::complex_1d_array& u,
437 int iu,
438 ap::complex_1d_array& v,
439 int iv)
440{
441 int i;
442 ap::complex s;
443
444 if( m==0||n==0 )
445 {
446 return;
447 }
448 if( cmatrixrank1f(m, n, a, ia, ja, u, iu, v, iv) )
449 {
450 return;
451 }
452 for(i = 0; i <= m-1; i++)
453 {
454 s = u(iu+i);
455 ap::vadd(&a(ia+i, ja), 1, &v(iv), 1, "N", ap::vlen(ja,ja+n-1), s);
456 }
457}
458
459
460/*************************************************************************

Callers

nothing calls this directly

Calls 2

cmatrixrank1fFunction · 0.85
vaddFunction · 0.85

Tested by

no test coverage detected