composite

package
v0.2.0-dev.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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