You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DimensionMismatch("Vector x has a length $(length(x)) but y has a length $(length(y))")
636
+
DimensionMismatch("Vectors and matrix have different dimensions, x has a length $(length(x)), y has a length $(length(y)), Q has side dimension $(length(d))")
636
637
)
637
638
end
638
-
d = Q.diag
639
639
nzvals =nonzeros(x)
640
640
nzinds =nonzeroinds(x)
641
641
s =zero(Base.promote_eltype(x, Q, y))
@@ -645,40 +645,40 @@ function dot(x::AbstractSparseVector, Q::Diagonal, y::AbstractVector)
DimensionMismatch("Vector a has a length $n but b has a length $(length(b))")
652
+
DimensionMismatch("Vectors and matrix have different dimensions, x has a length $(length(x)), y has a length $(length(y)), Q has side dimension $(length(d))")
653
653
)
654
654
end
655
-
anzind=nonzeroinds(a)
656
-
bnzind=nonzeroinds(b)
657
-
anzval=nonzeros(a)
658
-
bnzval=nonzeros(b)
659
-
s =zero(Base.promote_eltype(a, Q, b))
655
+
xnzind=nonzeroinds(x)
656
+
ynzind=nonzeroinds(y)
657
+
xnzval=nonzeros(x)
658
+
ynzval=nonzeros(y)
659
+
s =zero(Base.promote_eltype(x, Q, y))
660
660
661
-
ifisempty(anzind) ||isempty(bnzind)
661
+
ifisempty(xnzind) ||isempty(ynzind)
662
662
return s
663
663
end
664
664
665
-
a_idx=1
666
-
b_idx=1
667
-
a_idx_last=length(anzind)
668
-
b_idx_last=length(bnzind)
665
+
x_idx=1
666
+
y_idx=1
667
+
x_idx_last=length(xnzind)
668
+
y_idx_last=length(ynzind)
669
669
670
670
# go through the nonzero indices of a and b simultaneously
0 commit comments