Skip to content

Commit

Permalink
WIP: firstbitindex
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobnissen committed Oct 23, 2024
1 parent 700b564 commit c334880
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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
2 changes: 0 additions & 2 deletions src/bit-manipulation/bit-manipulation.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

include("bitindex.jl")

const BitUnsigned = Union{UInt8, UInt16, UInt32, UInt64, UInt128}

@inline function reversebits(x::T, ::BitsPerSymbol{2}) where T <: BitUnsigned
Expand Down

0 comments on commit c334880

Please sign in to comment.