Lines Matching refs:kn
70 func (kn kNucArray) Len() int { return len(kn) }
71 func (kn kNucArray) Swap(i, j int) { kn[i], kn[j] = kn[j], kn[i] }
72 func (kn kNucArray) Less(i, j int) bool {
73 if kn[i].count == kn[j].count {
74 return kn[i].name > kn[j].name // sort down
76 return kn[i].count > kn[j].count
80 kn := make(kNucArray, len(m))
83 kn[i].name = k
84 kn[i].count = v
87 sort.Sort(kn)
88 return kn
94 for _, kn := range a {
95 sum += kn.count
97 for _, kn := range a {
98 fmt.Printf("%s %.3f\n", kn.name, 100*float64(kn.count)/float64(sum))