Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add PermMatrixCSC #78

Merged
merged 13 commits into from
Apr 17, 2024
Prev Previous commit
Next Next commit
improve static performance of perm matrix
  • Loading branch information
GiggleLiu committed Feb 26, 2024
commit aaf1ff02aa427b07d029b95a8987d0eb7ea13ef5
2 changes: 1 addition & 1 deletion src/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ end
function Base.:*(A::PermMatrixCSC, B::PermMatrixCSC)
@assert basetype(A) == basetype(B)
size(A, 1) == size(B, 1) || throw(DimensionMismatch())
basetype(A)(A.perm[B.perm], [B.vals[i] * A.vals[B.perm[i]] for i in 1:size(A, 1)])
basetype(A)(A.perm[B.perm], B.vals .* view(A.vals, B.perm))
end

# to matrix
Expand Down