Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FloatSummary ¶
func Floats ¶
func Floats[T float](t ...T) FloatSummary
Float computes summary statistics for a collection of floating-point values. If the input is float32, the returned statistics are promoted to float64.
func StreamFloats ¶
StreamFloat reads floating-point numbers from r and computes summary statistics.
Input is tokenized using the provided bufio.SplitFunc. Each token is parsed using strconv.ParseFloat with the provided bitSize. Tokens that cannot be parsed are ignored.
StreamFloat does not close r; the caller is responsible for closing it, if necessary.
If the scanner encounters an I/O error, an empty FloatSummary and the corresponding error are returned.
type IntSummary ¶
func Ints ¶
func Ints[T integer](t ...T) IntSummary
Ints computes summary statistics for a collection of integer values. the average is returned as a float64.
func StreamInts ¶
StreamInt reads integers from r and computes summary statistics.
Input is tokenized using the provided bufio.SplitFunc. Each token is parsed as an integer using strconv.Atoi. Tokens that cannot be parsed are ignored.
StreamInt does not close r; the caller is responsible for closing it, if necessary.
If the scanner encounters an I/O error, an empty IntSummary and the corresponding error are returned.