@@ -357,20 +357,13 @@ function Base.show(io::IO, mime::MIME{Symbol("text/plain")}, F::QRSparse)
357357 println (io, " \n Column permutation:" )
358358 show (io, mime, F. pcol)
359359end
360- function Base. show (io:: IO , :: MIME{Symbol("text/plain")} , Q:: QRSparseQ )
361- summary (io, Q)
360+ # TODO : remove once the AdjointQ PR is merged
361+ if QRSparseQ <: AbstractMatrix
362+ function Base. show (io:: IO , :: MIME{Symbol("text/plain")} , Q:: QRSparseQ )
363+ summary (io, Q)
364+ end
362365end
363366
364- # With a real lhs and complex rhs with the same precision, we can reinterpret
365- # the complex rhs as a real rhs with twice the number of columns
366- #
367- # This definition is similar to the definition in factorization.jl except that
368- # here we have to use \ instead of ldiv! because of limitations in SPQR
369-
370- # # Two helper methods
371- _ret_size (F:: QRSparse , b:: AbstractVector ) = (size (F, 2 ),)
372- _ret_size (F:: QRSparse , B:: AbstractMatrix ) = (size (F, 2 ), size (B, 2 ))
373-
374367"""
375368 rank(::QRSparse{Tv,Ti}) -> Ti
376369
@@ -385,6 +378,16 @@ Calculate rank of `S` by calculating its QR factorization. Values smaller than `
385378"""
386379LinearAlgebra. rank (S:: SparseMatrixCSC ; tol= _default_tol (S)) = rank (qr (S; tol))
387380
381+ # With a real lhs and complex rhs with the same precision, we can reinterpret
382+ # the complex rhs as a real rhs with twice the number of columns
383+ #
384+ # This definition is similar to the definition in factorization.jl except that
385+ # here we have to use \ instead of ldiv! because of limitations in SPQR
386+
387+ # # Two helper methods
388+ _ret_size (F:: QRSparse , b:: AbstractVector ) = (size (F, 2 ),)
389+ _ret_size (F:: QRSparse , B:: AbstractMatrix ) = (size (F, 2 ), size (B, 2 ))
390+
388391function (\ )(F:: QRSparse{T} , B:: VecOrMat{Complex{T}} ) where T<: LinearAlgebra.BlasReal
389392# |z1|z3| reinterpret |x1|x2|x3|x4| transpose |x1|y1| reshape |x1|y1|x3|y3|
390393# |z2|z4| -> |y1|y2|y3|y4| -> |x2|y2| -> |x2|y2|x4|y4|
0 commit comments