MCPcopy Create free account
hub / github.com/gonum/plot / reverseOfPath

Function reverseOfPath

plotter/contour_test.go:190–199  ·  view source on GitHub ↗
(p vg.Path)

Source from the content-addressed store, hash-verified

188func (p byLength) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
189
190func reverseOfPath(p vg.Path) vg.Path {
191 rp := make(vg.Path, 0, len(p))
192 for i := len(p) - 1; i >= 0; i-- {
193 rp = append(rp, p[i])
194 }
195 rp[0].Type = vg.MoveComp
196 rp[len(rp)-1].Type = vg.LineComp
197
198 return rp
199}
200
201func circularPermutations(a, b vg.Path) bool {
202 if len(a) != len(b) {

Callers 1

TestContourPathsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected