package store
import "github.com/DataDog/sketches-go/ddsketch/store"
Index ¶
- type Bin
- func NewBin(index int, count float64) (*Bin, error)
- func (b *Bin) Count() float64
- func (b *Bin) Index() int
- type CollapsingHighestDenseStore
- func NewCollapsingHighestDenseStore(maxNumBins int) *CollapsingHighestDenseStore
- func (s *CollapsingHighestDenseStore) Add(index int)
- func (s *CollapsingHighestDenseStore) AddBin(bin Bin)
- func (s *CollapsingHighestDenseStore) AddWithCount(index int, count float64)
- func (s *CollapsingHighestDenseStore) Copy() Store
- func (s *CollapsingHighestDenseStore) MergeWith(other Store)
- type CollapsingLowestDenseStore
- func NewCollapsingLowestDenseStore(maxNumBins int) *CollapsingLowestDenseStore
- func (s *CollapsingLowestDenseStore) Add(index int)
- func (s *CollapsingLowestDenseStore) AddBin(bin Bin)
- func (s *CollapsingLowestDenseStore) AddWithCount(index int, count float64)
- func (s *CollapsingLowestDenseStore) Copy() Store
- func (s *CollapsingLowestDenseStore) MergeWith(other Store)
- type DenseStore
- func FromProto(pb *sketchpb.Store) *DenseStore
- func NewDenseStore() *DenseStore
- func (s *DenseStore) Add(index int)
- func (s *DenseStore) AddBin(bin Bin)
- func (s *DenseStore) AddWithCount(index int, count float64)
- func (s *DenseStore) Bins() <-chan Bin
- func (s *DenseStore) Copy() Store
- func (s *DenseStore) IsEmpty() bool
- func (s *DenseStore) KeyAtRank(rank float64) int
- func (s *DenseStore) MaxIndex() (int, error)
- func (s *DenseStore) MergeWith(other Store)
- func (s *DenseStore) MinIndex() (int, error)
- func (s *DenseStore) ToProto() *sketchpb.Store
- func (s *DenseStore) TotalCount() float64
- type Store
Types ¶
type Bin ¶
type Bin struct {
// contains filtered or unexported fields
}
func NewBin ¶
func (*Bin) Count ¶
func (*Bin) Index ¶
type CollapsingHighestDenseStore ¶
type CollapsingHighestDenseStore struct { DenseStore // contains filtered or unexported fields }
func NewCollapsingHighestDenseStore ¶
func NewCollapsingHighestDenseStore(maxNumBins int) *CollapsingHighestDenseStore
func (*CollapsingHighestDenseStore) Add ¶
func (s *CollapsingHighestDenseStore) Add(index int)
func (*CollapsingHighestDenseStore) AddBin ¶
func (s *CollapsingHighestDenseStore) AddBin(bin Bin)
func (*CollapsingHighestDenseStore) AddWithCount ¶
func (s *CollapsingHighestDenseStore) AddWithCount(index int, count float64)
func (*CollapsingHighestDenseStore) Copy ¶
func (s *CollapsingHighestDenseStore) Copy() Store
func (*CollapsingHighestDenseStore) MergeWith ¶
func (s *CollapsingHighestDenseStore) MergeWith(other Store)
type CollapsingLowestDenseStore ¶
type CollapsingLowestDenseStore struct { DenseStore // contains filtered or unexported fields }
CollapsingLowestDenseStore is a dynamically growing contiguous (non-sparse) store. The lower bins get combined so that the total number of bins do not exceed maxNumBins.
func NewCollapsingLowestDenseStore ¶
func NewCollapsingLowestDenseStore(maxNumBins int) *CollapsingLowestDenseStore
func (*CollapsingLowestDenseStore) Add ¶
func (s *CollapsingLowestDenseStore) Add(index int)
func (*CollapsingLowestDenseStore) AddBin ¶
func (s *CollapsingLowestDenseStore) AddBin(bin Bin)
func (*CollapsingLowestDenseStore) AddWithCount ¶
func (s *CollapsingLowestDenseStore) AddWithCount(index int, count float64)
func (*CollapsingLowestDenseStore) Copy ¶
func (s *CollapsingLowestDenseStore) Copy() Store
func (*CollapsingLowestDenseStore) MergeWith ¶
func (s *CollapsingLowestDenseStore) MergeWith(other Store)
type DenseStore ¶
type DenseStore struct {
// contains filtered or unexported fields
}
DenseStore is a dynamically growing contiguous (non-sparse) store. The number of bins are bound only by the size of the slice that can be allocated.
func FromProto ¶
func FromProto(pb *sketchpb.Store) *DenseStore
Returns an instance of DenseStore that contains the data in the provided protobuf representation.
func NewDenseStore ¶
func NewDenseStore() *DenseStore
func (*DenseStore) Add ¶
func (s *DenseStore) Add(index int)
func (*DenseStore) AddBin ¶
func (s *DenseStore) AddBin(bin Bin)
func (*DenseStore) AddWithCount ¶
func (s *DenseStore) AddWithCount(index int, count float64)
func (*DenseStore) Bins ¶
func (s *DenseStore) Bins() <-chan Bin
func (*DenseStore) Copy ¶
func (s *DenseStore) Copy() Store
func (*DenseStore) IsEmpty ¶
func (s *DenseStore) IsEmpty() bool
func (*DenseStore) KeyAtRank ¶
func (s *DenseStore) KeyAtRank(rank float64) int
Return the key for the value at rank
func (*DenseStore) MaxIndex ¶
func (s *DenseStore) MaxIndex() (int, error)
func (*DenseStore) MergeWith ¶
func (s *DenseStore) MergeWith(other Store)
func (*DenseStore) MinIndex ¶
func (s *DenseStore) MinIndex() (int, error)
func (*DenseStore) ToProto ¶
func (s *DenseStore) ToProto() *sketchpb.Store
func (*DenseStore) TotalCount ¶
func (s *DenseStore) TotalCount() float64
type Store ¶
type Store interface { Add(index int) AddBin(bin Bin) AddWithCount(index int, count float64) Bins() <-chan Bin Copy() Store IsEmpty() bool MaxIndex() (int, error) MinIndex() (int, error) TotalCount() float64 KeyAtRank(rank float64) int MergeWith(store Store) ToProto() *sketchpb.Store }
Source Files ¶
bin.go collapsing_highest_dense_store.go collapsing_lowest_dense_store.go dense_store.go store.go
- Version
- v1.0.0
- Published
- Dec 14, 2020
- Platform
- windows/amd64
- Imports
- 5 packages
- Last checked
- 5 hours ago –
Tools for package owners.