composite

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Avg

func Avg(scores map[string]float64) float64

Avg returns the arithmetic mean of scores.

func Max

func Max(scores map[string]float64) float64

Max returns the maximum value from scores.

func Min

func Min(scores map[string]float64) float64

Min returns the minimum value from scores.

func New

func New(scorers map[string]scorer.Scorer, reduce ReduceFunc, scope tally.Scope) scorer.Scorer

New creates a composite Scorer that evaluates all named child scorers and combines their results using the given reduce function. Panics if scorers is empty or reduce is nil.

Types

type ReduceFunc

type ReduceFunc func(map[string]float64) float64

ReduceFunc combines named scores into a single score.

Jump to

Keyboard shortcuts

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