Skip to content

Commit

Permalink
update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
shenwei356 committed Jun 1, 2024
1 parent 9dea1b8 commit 57e3bdc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Changelog

- v0.1.0
- first version.
- The speed is no ideal as the data structures and backtrace algorithm are inefficient.
- v0.2.1
- fix missing of bounds checking in adaptive reduction.
- v0.2.0
- rewrite the whole package.
- more accurate.
- 2X faster than v0.1.0, lower memory.
- v0.1.0
- first version.
- The speed is no ideal as the data structures and backtrace algorithm are inefficient.
6 changes: 3 additions & 3 deletions wfa_wavefront.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (wf *WaveFront) Increase(k int, delta uint32) {

// Get returns offset, wfaType, existed.
func (wf *WaveFront) Get(k int) (uint32, uint32, bool) {
if !(k >= wf.Lo && k <= wf.Hi) { // check k range
if k < wf.Lo || k > wf.Hi { // check k range
return 0, 0, false
}
offset := wf.Offsets[k2i(k)]
Expand All @@ -142,7 +142,7 @@ func (wf *WaveFront) Get(k int) (uint32, uint32, bool) {

// GetRaw returns "offset<<wfaTypeBits | wfaType", existed.
func (wf *WaveFront) GetRaw(k int) (uint32, bool) {
if !(k >= wf.Lo && k <= wf.Hi) { // check k range
if k < wf.Lo || k > wf.Hi { // check k range
return 0, false
}
offset := wf.Offsets[k2i(k)]
Expand All @@ -151,7 +151,7 @@ func (wf *WaveFront) GetRaw(k int) (uint32, bool) {

// Delete delete an offset of a k.
func (wf *WaveFront) Delete(k int) {
if !(k >= wf.Lo && k <= wf.Hi) { // check k range
if k < wf.Lo || k > wf.Hi { // check k range
return
}
wf.Offsets[k2i(k)] = 0
Expand Down

0 comments on commit 57e3bdc

Please sign in to comment.