@@ -580,6 +580,7 @@ QRCompactWYQ{S}(Q::QRCompactWYQ) where {S} = QRCompactWYQ(convert(AbstractMatrix
580
580
AbstractMatrix {S} (Q:: QRCompactWYQ{S} ) where {S} = Q
581
581
AbstractMatrix {S} (Q:: QRCompactWYQ ) where {S} = QRCompactWYQ {S} (Q)
582
582
Matrix {T} (Q:: AbstractQ{S} ) where {T,S} = convert (Matrix{T}, lmul! (Q, Matrix {S} (I, size (Q, 1 ), min (size (Q. factors)... ))))
583
+ Matrix {T} (adjQ:: AdjointQ{S} ) where {T,S} = convert (Matrix{T}, lmul! (adjQ, Matrix {S} (I, size (adjQ))))
583
584
Matrix (Q:: AbstractQ{T} ) where {T} = Matrix {T} (Q)
584
585
Array {T} (Q:: AbstractQ ) where {T} = Matrix {T} (Q)
585
586
Array (Q:: AbstractQ ) = Matrix (Q)
@@ -592,14 +593,14 @@ convert(::Type{AbstractQ{T}}, Q::QRPackedQ) where {T} = QRPackedQ{T}(Q)
592
593
convert (:: Type{AbstractQ{T}} , Q:: QRCompactWYQ ) where {T} = QRCompactWYQ {T} (Q)
593
594
convert (:: Type{AbstractQ{T}} , adjQ:: AdjointQ ) where {T} = adjoint (convert (AbstractQ{T}, adjQ. Q))
594
595
595
- size (F:: Union{QR,QRCompactWY,QRPivoted} , dim:: Integer ) = size (getfield (F, :factors ), dim)
596
596
size (F:: Union{QR,QRCompactWY,QRPivoted} ) = size (getfield (F, :factors ))
597
+ size (F:: Union{QR,QRCompactWY,QRPivoted} , dim:: Integer ) = size (getfield (F, :factors ), dim)
598
+ size (Q:: AbstractQ , dim:: Integer ) = dim in (1 , 2 ) ? size (Q)[dim] : 1
597
599
size (Q:: Union{QRCompactWYQ,QRPackedQ} , dim:: Integer ) =
598
- size (getfield (Q, : factors) , dim == 2 ? 1 : dim)
599
- size (Q:: Union{QRCompactWYQ,QRPackedQ} ) = size (Q, 1 ), size (Q, 1 )
600
+ size (Q . factors, dim == 2 ? 1 : dim)
601
+ size (Q:: Union{QRCompactWYQ,QRPackedQ} ) = (n = size (Q. factors , 1 ); (n, n) )
600
602
size (adjQ:: AdjointQ ) = size (adjQ. Q, 2 ), size (adjQ. Q, 1 )
601
- size (adjQ:: AdjointQ , dim:: Integer ) = dim in (1 , 2 ) ? size (adjQ)[dim] : 1
602
- # pseudo-array behvaiour, required for indexing with `begin` or `end`
603
+ # pseudo-array behaviour, required for indexing with `begin` or `end`
603
604
axes (Q:: AbstractQ ) = map (Base. OneTo, size (Q))
604
605
axes (Q:: AbstractQ , d:: Integer ) = d in (1 , 2 ) ? axes (Q)[d] : Base. OneTo (1 )
605
606
@@ -878,6 +879,10 @@ function *(adjA::Adjoint{<:Any,<:AbstractVecOrMat}, adjQ::AdjointQ)
878
879
return rmul! (Ac, convert (AbstractQ{TAQ}, adjQ))
879
880
end
880
881
882
+ # ## QQ (including adjoints)
883
+ * (Q:: AbstractQ , P:: AbstractQ ) = Q * (P* I)
884
+ mul! (C:: StridedVecOrMat{T} , Q:: AbstractQ{T} , B:: AbstractQ{T} ) where {T} = mul! (C, Q, B* I)
885
+
881
886
# ## mul!
882
887
function mul! (C:: StridedVecOrMat{T} , Q:: AbstractQ{T} , B:: AbstractVecOrMat{T} ) where {T}
883
888
require_one_based_indexing (C, B)
0 commit comments