AztecDiamonds.jl

A package for generating and analyzing Aztec diamonds
Author JuliaLabs
Popularity
1 Star
Updated Last
1 Year Ago
Started In
January 2023

AztecDiamonds

Stable Dev Build Status GPU Build status Coverage

A package for generating and analyzing Aztec diamonds

Getting Started

To generate an order-n Aztec diamond, simply call diamond(n)

julia> D = diamond(10)
10-order Tiling{Matrix{AztecDiamonds.Edge}}
                  ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ
                ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ
              ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ
            ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ
          ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ
        ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ
      ๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ
    ๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“
  ๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“
๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“
๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„
  ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„
    ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„
      ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‰๐Ÿฌ„
        ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ
          ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌฆ๐Ÿฌ“๐Ÿฌฆ๐Ÿฌ“๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ
            ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‰๐Ÿฌ„๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ
              ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ
                ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ
                  ๐Ÿฌ‡๐Ÿฌ‹๐Ÿฌ‹๐Ÿฌƒ

It is recommended that you use an interactive enviroment like Pluto, VS Code or IJulia to be able to view the generated diamonds in all their glory. Alternatively, you can also view them in a separate window using the ImageView package as follows:

julia> using ImageView

julia> imshow(AztecDiamonds.to_img(D))
[...]

It is possible to take advantage of GPU acceleration via KernelAbstractions.jl on supported backends, e.g. CUDA:

julia> using CUDA, CUDAKernels

julia> ka_diamond(200, CuArray)
[...]

You can extract the DR-path separating the northern arctic region from the rest of the diamond using the dr_path function.

julia> dr_path(D)
21-element OffsetArray(::Vector{Float64}, -10:10) with eltype Float64 with indices -10:10:
 -0.5
  0.5
  1.5
  2.5
  3.5
  4.5
  5.5
  4.5
  5.5
  6.5
  5.5
  5.5
  5.5
  4.5
  3.5
  3.5
  3.5
  2.5
  1.5
  0.5
 -0.5

Used By Packages

No packages found.