Documentation
¶
Index ¶
- func Float64s(a []float64) int
- func Float64sAreUnique(a []float64) bool
- func Ints(a []int) int
- func IntsAreUnique(a []int) bool
- func IsUnique(data Interface) bool
- func Stable(data Interface) int
- func Strings(a []string) int
- func StringsAreUnique(a []string) bool
- func Uniq(data Interface) int
- type Interface
- type Panel
- type Row
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Float64sAreUnique ¶
Float64sAreUnique tests whether the slice of float64 is sorted and unique.
func IntsAreUnique ¶
IntsAreUnique tests whether the slice of int is sorted and unique.
func Stable ¶
Stable moves the first unique elements to the beginning of the *sorted* collection and returns the number of unique elements, but also keeps the original order of duplicate elements.
It makes one call to data.Len, O(n) calls to data.Less, and O(n*log(n)) calls to data.Swap.
func StringsAreUnique ¶
StringsAreUnique tests whether the slice of string is sorted and unique.
func Uniq ¶
Uniq moves the first unique elements to the beginning of the *sorted* collection and returns the number of unique elements.
It makes one call to data.Len to determine n, n-1 calls to data.Less, and O(n) calls to data.Swap. The unique elements remain in original sorted order, but the duplicate elements do not.
Types ¶
type Interface ¶
type Interface interface {
// Len returns the number of elements.
Len() int
// Less tells if the element at index i should come
// before the element at index j.
Less(i, j int) bool
// Swap swaps the elements at indexes i and j.
Swap(i, j int)
}
Interface to use the uniq package. Identical to sort.Interface.
type Row ¶
type Row struct {
ID int
Label string
Scroll bool
Average bool
Labels *stringRingBuffer
Context context.Context
Data *float64RingBuffer
Averages *float64RingBuffer
LineChart *linechart.LineChart
BarChart *barchart.BarChart
SparkLine *sparkline.SparkLine
Textbox *text.Text
DataContainer []float64
LabelContainer []string
AverageContainer []float64
RedrawInterval time.Duration
SeekInterval time.Duration
}