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

Function rmatrixqrbasecase

src/ortfac.cpp:2867–2905  ·  view source on GitHub ↗

Base case for real QR -- LAPACK routine (version 3.0) -- Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., Courant Institute, Argonne National Lab, and Rice University September 30, 1994. Sergey Bochkanov, ALGLIB project, translation from FORTRAN to pseudocode, 2007-2010. *************************************************************************/

Source from the content-addressed store, hash-verified

2865 pseudocode, 2007-2010.
2866*************************************************************************/
2867static void rmatrixqrbasecase(ap::real_2d_array& a,
2868 int m,
2869 int n,
2870 ap::real_1d_array& work,
2871 ap::real_1d_array& t,
2872 ap::real_1d_array& tau)
2873{
2874 int i;
2875 int k;
2876 int minmn;
2877 double tmp;
2878
2879 minmn = ap::minint(m, n);
2880
2881 //
2882 // Test the input arguments
2883 //
2884 k = minmn;
2885 for(i = 0; i <= k-1; i++)
2886 {
2887
2888 //
2889 // Generate elementary reflector H(i) to annihilate A(i+1:m,i)
2890 //
2891 ap::vmove(&t(1), 1, &a(i, i), a.getstride(), ap::vlen(1,m-i));
2892 generatereflection(t, m-i, tmp);
2893 tau(i) = tmp;
2894 ap::vmove(&a(i, i), a.getstride(), &t(1), 1, ap::vlen(i,m-1));
2895 t(1) = 1;
2896 if( i<n )
2897 {
2898
2899 //
2900 // Apply H(i) to A(i:m-1,i+1:n-1) from the left
2901 //
2902 applyreflectionfromtheleft(a, tau(i), t, i, m-1, i+1, n-1, work);
2903 }
2904 }
2905}
2906
2907
2908/*************************************************************************

Callers 1

rmatrixqrFunction · 0.85

Calls 4

vmoveFunction · 0.85
generatereflectionFunction · 0.85
getstrideMethod · 0.80

Tested by

no test coverage detected