Skip to content

Commit fc755ff

Browse files
committedMar 11, 2022
bump version
1 parent 7a44029 commit fc755ff

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GraphTensorNetworks"
22
uuid = "0978c8c2-34f6-49c7-9826-ea2cc20dabd2"
33
authors = ["GiggleLiu <cacate0129@gmail.com> and contributors"]
4-
version = "0.2.7"
4+
version = "0.2.8"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"

‎src/arithematics.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,12 @@ end
224224
function sorted_sum_combination!(res::AbstractVector{TO}, A::AbstractVector{TO}, B::AbstractVector{TO}) where TO
225225
K = length(res)
226226
@assert length(B) == length(A) == K
227-
maxval = A[K] * B[K]
227+
@inbounds maxval = A[K] * B[K]
228228
ptr = K
229-
res[ptr] = maxval
230-
queue = [(K,K-1,A[K]*B[K-1]), (K-1,K,A[K-1]*B[K])]
229+
@inbounds res[ptr] = maxval
230+
@inbounds queue = [(K,K-1,A[K]*B[K-1]), (K-1,K,A[K-1]*B[K])]
231231
for k = 1:K-1
232-
(i, j, res[K-k]) = _pop_max_sum!(queue) # TODO: do not enumerate, use better data structures
232+
@inbounds (i, j, res[K-k]) = _pop_max_sum!(queue) # TODO: do not enumerate, use better data structures
233233
_push_if_not_exists!(queue, i, j-1, A, B)
234234
_push_if_not_exists!(queue, i-1, j, A, B)
235235
end

0 commit comments

Comments
 (0)
Please sign in to comment.