@@ -142,7 +142,7 @@ function expectation(X::Expr)
142
142
# #################################
143
143
# Step 2. Enumerate permutations #
144
144
# #################################
145
- AllTerms = {}
145
+ AllTerms = Any[]
146
146
for sigma in @task permutations_in_Sn (n)
147
147
for tau in @task permutations_in_Sn (n)
148
148
sigma_inv= permutation_inverse (sigma)
@@ -186,7 +186,7 @@ function expectation(X::Expr)
186
186
println (" START PARSING" )
187
187
println (" The term is =" , ReindexedSymbols[end ])
188
188
Symb, left_idx, right_idx = pop! (ReindexedSymbols)
189
- Expression= {{{ Symb} , left_idx, right_idx}}
189
+ Expression= [Any[Symbol[ Symb] , left_idx, right_idx]]
190
190
while length (ReindexedSymbols) > 0
191
191
pop_idx = expr_idx = do_transpose = is_left = nothing
192
192
for expr_iter in enumerate (Expression)
@@ -227,7 +227,7 @@ function expectation(X::Expr)
227
227
if pop_idx == nothing # Found nothing, start new expression blob
228
228
println (" New word: The term is " , ReindexedSymbols[1 ])
229
229
Symb, left_idx, right_idx = delete! (ReindexedSymbols, 1 )
230
- push! (Expression, {{ Symb} , left_idx, right_idx} )
230
+ push! (Expression, [Symbol[ Symb] , left_idx, right_idx] )
231
231
else # Found something
232
232
println (" The term is =" , ReindexedSymbols[pop_idx])
233
233
Symb, col_idx, row_idx = delete! (ReindexedSymbols, pop_idx)
@@ -244,7 +244,7 @@ function expectation(X::Expr)
244
244
println (" DONE PARSING TREE" )
245
245
246
246
# Evaluate closed cycles
247
- NewExpression= {}
247
+ NewExpression= Any[]
248
248
for ExprChunk in Expression
249
249
ExprBlob, start_idx, end_idx = ExprChunk
250
250
print (ExprChunk, " => " )
0 commit comments