Skip to content

Commit

Permalink
fixed full precision
Browse files Browse the repository at this point in the history
  • Loading branch information
semi committed Aug 7, 2021
1 parent 4d172da commit 2bd028c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ func FastTrigrams(l Layout, precision int) [5]int {
var redirects int
var total int

if precision == 0 {
precision = len(Data.TopTrigrams)
}

for _, tg := range Data.TopTrigrams[:precision] {
f1 := l.Fingermatrix[l.Keymap[string(tg.Ngram[0])]]
f2 := l.Fingermatrix[l.Keymap[string(tg.Ngram[1])]]
Expand Down

0 comments on commit 2bd028c

Please sign in to comment.