Skip to content

Commit

Permalink
Better weights?
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed May 3, 2017
1 parent 1dbc232 commit 4fa1539
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion closestmatch.go
Expand Up @@ -86,7 +86,7 @@ func (cm *ClosestMatch) worker(id int, jobs <-chan job, results chan<- result) {
if _, ok2 := m[cm.ID[id].Key]; !ok2 {
m[cm.ID[id].Key] = 0
}
m[cm.ID[id].Key] += 1000/len(cm.ID[id].Key) + weight
m[cm.ID[id].Key] += 1+1000/len(cm.ID[id].Key) + weight
}
}
results <- result{m: m}
Expand Down
6 changes: 3 additions & 3 deletions cmserver/server.go
Expand Up @@ -57,9 +57,9 @@ func main() {
log.Info("...computing cm...")
cm = closestmatch.New(strings.Split(string(keys), "\n"), intArray)
log.Info("...computed.")
log.Info("Saving...")
cm.Save(listfile + ".cm")
log.Info("...saving.")
//log.Info("Saving...")
//cm.Save(listfile + ".cm")
//log.Info("...saving.")
}

startTime := time.Now()
Expand Down

0 comments on commit 4fa1539

Please sign in to comment.