MCPcopy Index your code
hub / github.com/gonum/plot / maxCoverage

Function maxCoverage

labelling.go:229–237  ·  view source on GitHub ↗

maxCoverage returns the maximum coverage achievable for the data range.

(dMin, dMax, span float64)

Source from the content-addressed store, hash-verified

227// maxCoverage returns the maximum coverage achievable for the data
228// range.
229func maxCoverage(dMin, dMax, span float64) float64 {
230 r := dMax - dMin
231 if span <= r {
232 return 1
233 }
234 h := 0.5 * (span - r)
235 r *= 0.1
236 return 1 - (h*h)/(r*r)
237}
238
239// density returns the density score which measures the goodness of
240// the labelling density compared to the user defined target

Callers 1

talbotLinHanrahanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected