JuliaMath / JuliaMath/Combinatorics.jl

Add hooklength

Open
#60 1 comment 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.