Lines Matching refs:kn
69 func (kn kNucArray) Len() int { return len(kn) }
70 func (kn kNucArray) Swap(i, j int) { kn[i], kn[j] = kn[j], kn[i] }
71 func (kn kNucArray) Less(i, j int) bool {
72 if kn[i].count == kn[j].count {
73 return kn[i].name > kn[j].name // sort down
75 return kn[i].count > kn[j].count
79 kn := make(kNucArray, len(m))
82 kn[i] = kNuc{k, v}
85 sort.Sort(kn)
86 return kn
91 for _, kn := range a {
92 sum += kn.count
94 for _, kn := range a {
95 fmt.Printf("%s %.3f\n", kn.name, 100*float64(kn.count)/float64(sum))