mirror of
https://github.com/sjwhitworth/golearn.git
synced 2025-04-25 13:48:49 +08:00
16 lines
296 B
Go
16 lines
296 B
Go
package filters
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// FrequencyTableEntry is a struct holding a value and a map of frequency
|
|
type FrequencyTableEntry struct {
|
|
Value float64
|
|
Frequency map[string]int
|
|
}
|
|
|
|
func (t *FrequencyTableEntry) String() string {
|
|
return fmt.Sprintf("%.2f %+v", t.Value, t.Frequency)
|
|
}
|