Procs
proc orgqr[T: SomeFloat](rv_q: var Tensor[T]; tau: openArray[T]; scratchspace: var seq[T])
-
Wrapper for LAPACK orgqr routine Generates the orthonormal Q matrix from elementary Householder reflectors
Inputs must come from a previous geqrf
- rv_q: contains r_v (reflector vector) on input. A column-major vector factors of elementary reflectors
- tau: Scalar factors of elementary reflectors
Outputs
- rv_q: overwritten by Q
Note that while rv_q is MxN on input on output the shape is M x min(M,N)
⚠️: Output must be sliced by M, min(M,N) if M>N as the rest contains garbage
Spec: https://www.nag.co.uk/numeric/fl/nagdoc_fl24/pdf/f08/f08aff.pdf API: http://www.netlib.org/lapack/explore-html/da/dba/group__double_o_t_h_e_rcomputational_ga14b45f7374dc8654073aa06879c1c459.html
Source Edit proc ormqr[T: SomeFloat](C: var Tensor[T]; Q: Tensor[T]; tau: openArray[T]; side, trans: static char; scratchspace: var seq[T])
-
Wrapper for LAPACK ormqr routine Multiply the orthonormal Q matrix from geqrf with another matrix C without materializing Q
C is a matrix of shae M, N and will be overwritten by
SIDE = 'L' SIDE = 'R'
TRANS = 'N': Q * C C * Q TRANS = 'T': QT * C C * QT
Source Edit