Skip to content

Commit

Permalink
Merge pull request #2 from alexandear/fix-var-typo
Browse files Browse the repository at this point in the history
  • Loading branch information
haoel authored Apr 21, 2023
2 parents 1132fe8 + 8c55fb7 commit 3c3693a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/ltd.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ func LTD(data []Point, threshold int) []Point {
}

// 5: Find the pair of adjacent buckets A and B with the lowest SSE sum .
lowestSSEAdajacentBucketIndex := findLowestSSEAdjacentBucketsIndex(sseForBuckets, highestSSEBucketIndex)
if lowestSSEAdajacentBucketIndex < 0 {
lowestSSEAdjacentBucketIndex := findLowestSSEAdjacentBucketsIndex(sseForBuckets, highestSSEBucketIndex)
if lowestSSEAdjacentBucketIndex < 0 {
break
}

Expand All @@ -174,10 +174,10 @@ func LTD(data []Point, threshold int) []Point {
buckets = splitBucketAt(buckets, highestSSEBucketIndex)

// 7: Merge the buckets A and B
if lowestSSEAdajacentBucketIndex > highestSSEBucketIndex {
lowestSSEAdajacentBucketIndex++
if lowestSSEAdjacentBucketIndex > highestSSEBucketIndex {
lowestSSEAdjacentBucketIndex++
}
buckets = mergeBucketAt(buckets, lowestSSEAdajacentBucketIndex)
buckets = mergeBucketAt(buckets, lowestSSEAdjacentBucketIndex)

}
// 10: Use the Largest-Triangle-Three-Buckets algorithm on the resulting bucket
Expand Down

0 comments on commit 3c3693a

Please sign in to comment.