Help us shape the future of Go! Take the 2026 Go Developer Survey

wrh

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2017 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WeightedScore

func WeightedScore(key, name string, weight float64) float64

WeightScore calculates weighted score of bucket named name with weight for given key.

Types

type Table

type Table map[string]float64

Table represents WRH hash table

func (Table) Calc

func (t Table) Calc(key string) Table

Calc calculates new table containing all the scores for the given key.

func (Table) List

func (t Table) List(key string) []string

List is a convenience shourtcut function that returns list of keys sorted by their score.

func (Table) Sort

func (t Table) Sort() []string

Sort sorts score table by score for given key in descending order. It returns slice of sorted keys.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL