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

Function maxSimplicity

labelling.go:208–215  ·  view source on GitHub ↗

maxSimplicity returns the maximum simplicity for q, Q and skip.

(q float64, Q []float64, skip int)

Source from the content-addressed store, hash-verified

206
207// maxSimplicity returns the maximum simplicity for q, Q and skip.
208func maxSimplicity(q float64, Q []float64, skip int) float64 {
209 for i, v := range Q {
210 if v == q {
211 return 1 - float64(i)/(float64(len(Q))-1) - float64(skip) + 1
212 }
213 }
214 panic("labelling: invalid q for Q")
215}
216
217// coverage returns the coverage score for based on the average
218// squared distance between the extreme labels, lMin and lMax, and

Callers 1

talbotLinHanrahanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected