JuliaMath / JuliaMath/Combinatorics.jl
Add hooklength
Open
- Dominant language
- Julia
- Stars
- 230
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
I have the following code that calculates the `hooklength` of a partition. I'll put in a PR when I get time:
```julia
function hooklength(σ::Vector{Int})
ret = 1
m = length(σ)
for k = 1:m, j=1:σ[k]
ret_2 = 0
ret_2 += σ[k]-j
for p = k:m
σ[p] < j && break
ret_2 += 1
end
ret *= ret_2
end
factorial(sum(σ)) ÷ ret
end
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.