Skip to content

Commit

Permalink
N-order -> Order-N (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
simeonschaub authored Sep 24, 2024
1 parent 39ca617 commit 65a30c7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To generate an order-n Aztec diamond, simply call `diamond(n)`

```julia-repl
julia> D = diamond(10)
10-order Tiling{Matrix{AztecDiamonds.Edge}}
Order-10 Tiling{Matrix{AztecDiamonds.Edge}}
🬇🬋🬋🬃
🬇🬋🬋🬃🬇🬋🬋🬃
🬇🬋🬋🬃🬇🬋🬋🬃🬇🬋🬋🬃
Expand Down
6 changes: 3 additions & 3 deletions src/AztecDiamonds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ the tiling is not fully filled yet.
```jldoctest
julia> t = Tiling(1)
1-order Tiling{Matrix{AztecDiamonds.Edge}}
Order-1 Tiling{Matrix{AztecDiamonds.Edge}}
julia> t[0, 0] = t[1, 0] = AztecDiamonds.RIGHT;
julia> t
1-order Tiling{Matrix{AztecDiamonds.Edge}}
Order-1 Tiling{Matrix{AztecDiamonds.Edge}}
🬇🬋🬋🬃
🬇🬋🬋🬃
```
Expand Down Expand Up @@ -184,7 +184,7 @@ Generates a uniformally random order N diamond tiling.
julia> using Random; Random.seed!(1);
julia> diamond(4)
4-order Tiling{Matrix{AztecDiamonds.Edge}}
Order-4 Tiling{Matrix{AztecDiamonds.Edge}}
🬇🬋🬋🬃
🬇🬋🬋🬃🬇🬋🬋🬃
🬦🬓🬦🬓🬦🬓🬦🬓🬇🬋🬋🬃
Expand Down
2 changes: 1 addition & 1 deletion src/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using Colors
import ImageShow
using Base64: Base64EncodePipe

Base.summary(io::IO, t::Tiling) = print(io, t.N, "-order ", typeof(t))
Base.summary(io::IO, t::Tiling) = print(io, "Order-", t.N, " ", typeof(t))

function to_img(t::Tiling)
img = fill(colorant"transparent", inds(t.N))
Expand Down
4 changes: 2 additions & 2 deletions test/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
end

@testitem "pretty printing" begin
@test summary(Tiling(2)) == "2-order $Tiling{Matrix{AztecDiamonds.Edge}}"
@test summary(Tiling(2)) == "Order-2 $Tiling{Matrix{AztecDiamonds.Edge}}"
@test repr(Tiling(1)) == "Tiling(1, [NONE NONE; NONE NONE])"

N = 20
Expand Down Expand Up @@ -49,7 +49,7 @@ end
# TODO: should
expected = replace(
"""
4-order $Tiling{Matrix{AztecDiamonds.Edge}}
Order-4 $Tiling{Matrix{AztecDiamonds.Edge}}
🬦🬓 \\
UU \\
🬉🬄 \\
Expand Down

0 comments on commit 65a30c7

Please sign in to comment.