Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/lattices/chains.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
end
end
Base.axes(::InfiniteChain) = ((-typemax(Int)):typemax(Int),)
Base.isfinite(::Type{InfiniteChain}) = false

Check warning on line 13 in src/lattices/chains.jl

View check run for this annotation

Codecov / codecov/patch

src/lattices/chains.jl#L13

Added line #L13 was not covered by tests

"""
FiniteChain(length::Integer=1)
Expand All @@ -23,6 +24,7 @@
end
end
Base.axes(chain::FiniteChain) = (1:(chain.L),)
Base.isfinite(::Type{FiniteChain}) = true

Check warning on line 27 in src/lattices/chains.jl

View check run for this annotation

Codecov / codecov/patch

src/lattices/chains.jl#L27

Added line #L27 was not covered by tests

const Chain = Union{InfiniteChain,FiniteChain}

Expand Down
3 changes: 3 additions & 0 deletions src/lattices/squarelattice.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
end
InfiniteLadder(N::Integer) = InfiniteStrip(2, N)
Base.axes(strip::InfiniteStrip) = (1:(strip.L), (-typemax(Int)):typemax(Int))
Base.isfinite(::Type{InfiniteStrip}) = false

Check warning on line 18 in src/lattices/squarelattice.jl

View check run for this annotation

Codecov / codecov/patch

src/lattices/squarelattice.jl#L18

Added line #L18 was not covered by tests

"""
InfiniteCylinder(L::Int, N::Int)
Expand All @@ -33,6 +34,7 @@
end

Base.axes(::InfiniteCylinder) = ((-typemax(Int)):typemax(Int), (-typemax(Int)):typemax(Int))
Base.isfinite(::Type{InfiniteCylinder}) = false

Check warning on line 37 in src/lattices/squarelattice.jl

View check run for this annotation

Codecov / codecov/patch

src/lattices/squarelattice.jl#L37

Added line #L37 was not covered by tests

"""
InfiniteHelix(L::Integer, N::Integer)
Expand All @@ -51,6 +53,7 @@
function Base.axes(::InfiniteHelix)
return ((-typemax(Int)):typemax(Int), (-typemax(Int)):typemax(Int))
end
Base.isfinite(::Type{InfiniteHelix}) = false

Check warning on line 56 in src/lattices/squarelattice.jl

View check run for this annotation

Codecov / codecov/patch

src/lattices/squarelattice.jl#L56

Added line #L56 was not covered by tests

############################################################################################

Expand Down
2 changes: 2 additions & 0 deletions src/lattices/triangularlattice.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
end
end

Base.isfinite(::Type{HoneycombYC}) = false

Check warning on line 20 in src/lattices/triangularlattice.jl

View check run for this annotation

Codecov / codecov/patch

src/lattices/triangularlattice.jl#L20

Added line #L20 was not covered by tests

# TODO: do proper boundscheck
function Base.checkbounds(::Type{Bool}, lattice::HoneycombYC, inds::Vararg{Int,2})
return true
Expand Down
Loading