Skip to content

Commit

Permalink
Explicitly implement eachindex
Browse files Browse the repository at this point in the history
  • Loading branch information
garrison committed Aug 17, 2017
1 parent d4cc824 commit 1d7ca41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Bravais.jl
Expand Up @@ -193,6 +193,8 @@ maxcoords(lattice::WrappedLatticeUnion) = maxcoords(lattice.lattice)

Base.length(lattice::LatticeImplUnion) = lattice.N_tot

Base.eachindex(lattice::AbstractLattice) = Base.OneTo(length(lattice))

Base.size(lattice::AbstractLattice) = (length(lattice),)

function Base.getindex(lattice::AbstractLattice, index::Integer)
Expand Down

0 comments on commit 1d7ca41

Please sign in to comment.