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

Function rmatrixbdsvd

src/bdsvd.cpp:134–160  ·  view source on GitHub ↗

Singular value decomposition of a bidiagonal matrix (extended algorithm) The algorithm performs the singular value decomposition of a bidiagonal matrix B (upper or lower) representing it as B = Q*S*P^T, where Q and P - orthogonal matrices, S - diagonal matrix with non-negative elements on the main diagonal, in descending order. The algorithm finds singular values. In addition, the alg

Source from the content-addressed store, hash-verified

132 October 31, 1999.
133*************************************************************************/
134bool rmatrixbdsvd(ap::real_1d_array& d,
135 ap::real_1d_array e,
136 int n,
137 bool isupper,
138 bool isfractionalaccuracyrequired,
139 ap::real_2d_array& u,
140 int nru,
141 ap::real_2d_array& c,
142 int ncc,
143 ap::real_2d_array& vt,
144 int ncvt)
145{
146 bool result;
147 ap::real_1d_array d1;
148 ap::real_1d_array e1;
149
150 d1.setbounds(1, n);
151 ap::vmove(&d1(1), 1, &d(0), 1, ap::vlen(1,n));
152 if( n>1 )
153 {
154 e1.setbounds(1, n-1);
155 ap::vmove(&e1(1), 1, &e(0), 1, ap::vlen(1,n-1));
156 }
157 result = bidiagonalsvddecompositioninternal(d1, e1, n, isupper, isfractionalaccuracyrequired, u, 0, nru, c, 0, ncc, vt, 0, ncvt);
158 ap::vmove(&d(0), 1, &d1(1), 1, ap::vlen(0,n-1));
159 return result;
160}
161
162
163bool bidiagonalsvddecomposition(ap::real_1d_array& d,

Callers 1

rmatrixsvdFunction · 0.85

Calls 3

vmoveFunction · 0.85
setboundsMethod · 0.45

Tested by

no test coverage detected