Skip to content

Commit

Permalink
WIP: firstbitindex
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobnissen committed Jan 21, 2024
1 parent fa55ab3 commit 476cc25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/biosequence/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
(i % UInt) - 1 < (lastindex(seq) % UInt) ? (@inbounds seq[i], i + 1) : nothing
end

lastbitindex(x::BioSequence) = bitindex(x, lastindex(x))
firstbitindex(x::BioSequence) = bitindex(x, firstindex(x))

Check warning on line 15 in src/biosequence/indexing.jl

View check run for this annotation

Codecov / codecov/patch

src/biosequence/indexing.jl#L14-L15

Added lines #L14 - L15 were not covered by tests

## Bounds checking
function Base.checkbounds(x::BioSequence, i::Integer)
firstindex(x) i lastindex(x) || throw(BoundsError(x, i))
Expand Down

0 comments on commit 476cc25

Please sign in to comment.