@@ -142,7 +142,7 @@ function expectation(X::Expr)
142142 # #################################
143143 # Step 2. Enumerate permutations #
144144 # #################################
145- AllTerms = {}
145+ AllTerms = Any[]
146146 for sigma in @task permutations_in_Sn (n)
147147 for tau in @task permutations_in_Sn (n)
148148 sigma_inv= permutation_inverse (sigma)
@@ -186,7 +186,7 @@ function expectation(X::Expr)
186186 println (" START PARSING" )
187187 println (" The term is =" , ReindexedSymbols[end ])
188188 Symb, left_idx, right_idx = pop! (ReindexedSymbols)
189- Expression= {{{ Symb} , left_idx, right_idx}}
189+ Expression= [Any[Symbol[ Symb] , left_idx, right_idx]]
190190 while length (ReindexedSymbols) > 0
191191 pop_idx = expr_idx = do_transpose = is_left = nothing
192192 for expr_iter in enumerate (Expression)
@@ -227,7 +227,7 @@ function expectation(X::Expr)
227227 if pop_idx == nothing # Found nothing, start new expression blob
228228 println (" New word: The term is " , ReindexedSymbols[1 ])
229229 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] )
231231 else # Found something
232232 println (" The term is =" , ReindexedSymbols[pop_idx])
233233 Symb, col_idx, row_idx = delete! (ReindexedSymbols, pop_idx)
@@ -244,7 +244,7 @@ function expectation(X::Expr)
244244 println (" DONE PARSING TREE" )
245245
246246 # Evaluate closed cycles
247- NewExpression= {}
247+ NewExpression= Any[]
248248 for ExprChunk in Expression
249249 ExprBlob, start_idx, end_idx = ExprChunk
250250 print (ExprChunk, " => " )
0 commit comments