Skip to content

Commit 162ed07

Browse files
committed
Removed unused constants and functions
1 parent 40329f6 commit 162ed07

2 files changed

Lines changed: 3 additions & 15 deletions

File tree

kmeans.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ import (
1010
)
1111

1212
const (
13-
CHANGES_THRESHOLD = 2
14-
GOROUTINE_THRESHOLD = 2
15-
MEAN_THRESHOLD = 0.05
13+
CHANGES_THRESHOLD = 2
1614
)
1715

1816
type kmeansClusterer struct {
@@ -174,11 +172,11 @@ func (c *kmeansClusterer) Online(observations chan []float64, done chan struct{}
174172
var (
175173
k int
176174
n float64
177-
m float64 = squaredDistance(o, c.m[0])
175+
m float64 = c.distance(o, c.m[0])
178176
)
179177

180178
for i := 1; i < l; i++ {
181-
if n = squaredDistance(o, c.m[i]); n < m {
179+
if n = c.distance(o, c.m[i]); n < m {
182180
m = n
183181
k = i
184182
}

util.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)