Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simeonschaub/youngtableaux.jl
utility package for dealing with partitions, Young tableaux and such
https://github.com/simeonschaub/youngtableaux.jl
mathematics random-matrix-theory young-tableaux
Last synced: 29 days ago
JSON representation
utility package for dealing with partitions, Young tableaux and such
- Host: GitHub
- URL: https://github.com/simeonschaub/youngtableaux.jl
- Owner: simeonschaub
- License: mit
- Created: 2023-10-16T13:40:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-30T08:07:49.000Z (about 1 year ago)
- Last Synced: 2025-01-20T23:34:52.070Z (about 1 month ago)
- Topics: mathematics, random-matrix-theory, young-tableaux
- Language: Julia
- Homepage:
- Size: 4.49 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YoungTableaux
[](https://simeonschaub.github.io/YoungTableaux.jl/stable/)
[](https://simeonschaub.github.io/YoungTableaux.jl/dev/)
[](https://github.com/simeonschaub/YoungTableaux.jl/actions/workflows/CI.yml?query=branch%3Amain)
[](https://codecov.io/gh/simeonschaub/YoungTableaux.jl)See the demo [here](https://simeonschaub.github.io/YoungTableaux.jl/notebooks/notebooks/demo1.html)
Young Tableaux can be constructed as follows:
```julia
julia> using YoungTableauxjulia> YoungTableau([[1, 3, 4], [2, 5], [6]])
3×3 YoungTableau{Int64}
┌───┬───┬───┐
│ 1 │ 3 │ 4 │
├───┼───┼───┘
│ 2 │ 5 │
├───┼───┘
│ 6 │
└───┘
```Alternatively they can also be constructed from a permutation:
```julia
julia> π = [4, 6, 3, 8, 1, 2, 7, 5]
8-element Vector{Int64}:
4
6
3
8
1
2
7
5julia> P, Q = rs_pair(π)
(YoungTableau{Int64}([[1, 2, 5], [3, 6, 7], [4, 8]]), YoungTableau{Int64}([[1, 2, 4], [3, 6, 7], [5, 8]]))julia> P
3×3 YoungTableau{Int64}
┌───┬───┬───┐
│ 1 │ 2 │ 5 │
├───┼───┼───┤
│ 3 │ 6 │ 7 │
├───┼───┼───┘
│ 4 │ 8 │
└───┴───┘julia> Q
3×3 YoungTableau{Int64}
┌───┬───┬───┐
│ 1 │ 2 │ 4 │
├───┼───┼───┤
│ 3 │ 6 │ 7 │
├───┼───┼───┘
│ 5 │ 8 │
└───┴───┘
```Broadcasting works just like with arrays!
```julia
julia> P .+ Q
3×3 YoungTableau{Int64}
┌────┬────┬────┐
│ 2 │ 4 │ 9 │
├────┼────┼────┤
│ 6 │ 12 │ 14 │
├────┼────┼────┘
│ 9 │ 16 │
└────┴────┘
```Partitions are just like Young Tableaux, but without entries. When iterating a
partition only `true` is returned. Indices of the square can be computed using
`eachindex`.```julia
julia> Partition([3, 3, 2])
3×3 Partition
┌───┬───┬───┐
│ │ │ │
├───┼───┼───┤
│ │ │ │
├───┼───┼───┘
│ │ │
└───┴───┘julia> eachindex(Partition([3, 3, 2]))
3×3 YoungTableaux.EachIndexOf{Partition}
┌─────┬─────┬─────┐
│ 1,1 │ 1,2 │ 1,3 │
├─────┼─────┼─────┤
│ 2,1 │ 2,2 │ 2,3 │
├─────┼─────┼─────┘
│ 3,1 │ 3,2 │
└─────┴─────┘
```The partition corresponding to a Young Tableaux can be requested using
`shape`, which will return a lazy wrapper:```julia
julia> shape(P)
3×3 YoungTableaux.PartitionOf{YoungTableau{Int64}}
┌───┬───┬───┐
│ │ │ │
├───┼───┼───┤
│ │ │ │
├───┼───┼───┘
│ │ │
└───┴───┘
```Addition and substraction work as defined in Macdonald: "Symmetric Functions
and Hall Polynomials"```julia
julia> shape(P) - Partition([2, 1])
3×3 SkewPartition
┌───┬───┬───┐
│ │ │ * │
├───┼───┼───┤
│ │ * │ * │
├───┼───┼───┘
│ * │ * │
└───┴───┘julia> shape(P) + Partition([2, 1])
3×5 Partition
┌───┬───┬───┬───┬───┐
│ │ │ │ │ │
├───┼───┼───┼───┼───┘
│ │ │ │ │
├───┼───┼───┴───┘
│ │ │
└───┴───┘
```There is also initial support for conjugating diagrams using the adjoint
operator like with regular matrices. It is currently implemented lazily
but this may be subject to change.```julia
julia> P'
3×3 YoungTableaux.ConjugateDiagram{Int64, YoungTableau{Int64}}
┌───┬───┬───┐
│ 1 │ 3 │ 4 │
├───┼───┼───┤
│ 2 │ 6 │ 8 │
├───┼───┼───┘
│ 5 │ 7 │
└───┴───┘
```