Skip to content

Commit

Permalink
more dot arithms
Browse files Browse the repository at this point in the history
  • Loading branch information
jrising committed Apr 16, 2019
1 parent 022b19a commit 2cf5601
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ DataFrames
Clp
Distributions
BlackBoxOptim
LinearAlgebra

8 changes: 4 additions & 4 deletions src/linproghouse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1448,8 +1448,8 @@ function matrixintersect(rowdims::Vector{Int64}, coldims::Vector{Int64}, rowdimn
alljjs2 = zeros(Int64, length(alljjs) * shareddupouter)

for kk in 1:shareddupouter
alliis2[(kk - 1) * length(alliis) + (1:length(alliis))] = (kk - 1) * rownotshared + alliis
alljjs2[(kk - 1) * length(alljjs) + (1:length(alljjs))] = (kk - 1) * colnotshared + alljjs
alliis2[(kk - 1) * length(alliis) .+ (1:length(alliis))] = (kk - 1) * rownotshared .+ alliis
alljjs2[(kk - 1) * length(alljjs) .+ (1:length(alljjs))] = (kk - 1) * colnotshared .+ alljjs
end

sparse(alliis2, alljjs2, allvvs2, prod(rowdims), prod(coldims))
Expand Down Expand Up @@ -1505,8 +1505,8 @@ function matrixduplicate_extremes(A::SparseMatrixCSC{Float64, Int64}, rowdims::V
## order is vec([(slow, fast) for fast in 1:N, slow in 1:M])
rowduped = vec([(rowoo - 1) * nrows * rowdupinner + (iis[kk] - 1) * rowdupinner + rowii for rowii in 1:rowdupinner, rowoo in 1:rowdupouter])
colduped = vec([(coloo - 1) * ncols * coldupinner + (jjs[kk] - 1) * coldupinner + colii for colii in 1:coldupinner, coloo in 1:coldupouter])
alliis[(kk - 1) * kkdupnum + (1:kkdupnum)] = repeat(rowduped, outer=[coldupouter*coldupinner])
alljjs[(kk - 1) * kkdupnum + (1:kkdupnum)] = repeat(colduped, inner=[rowdupouter*rowdupinner])
alliis[(kk - 1) * kkdupnum .+ (1:kkdupnum)] = repeat(rowduped, outer=[coldupouter*coldupinner])
alljjs[(kk - 1) * kkdupnum .+ (1:kkdupnum)] = repeat(colduped, inner=[rowdupouter*rowdupinner])
end

sparse(alliis, alljjs, allvvs, prod(rowdims), prod(coldims))
Expand Down

0 comments on commit 2cf5601

Please sign in to comment.