JuliaMath / Combinatorics.jl

A combinatorics library for Julia
http://juliamath.github.io/Combinatorics.jl/dev/
Other
214 stars 58 forks source link

Levi-Civita call is unhelpful. #137

Open andrewkhardy opened 1 year ago

andrewkhardy commented 1 year ago

I would expect the function levicivita to take the permutations iterator as an input, so that something like this

Using Combinatorics
vectors = [[1],[2],[2]]
perms = permutations(vectors)
lvtensor = levicivita(perms)
parr = collect(perms)
for i in 1:size(parr)
     result += lvtensor[i]*prod(parr[i])

does the Einstein summation that the tensor is used for. What is the actual syntax for this and is it possible to change it to the more proper / intuitive syntax?