subpath returns a subpath given the slice of point indices into the path.
(i []int)
| 597 | // subpath returns a subpath given the slice of point indices |
| 598 | // into the path. |
| 599 | func (p path) subpath(i []int) path { |
| 600 | pa := make(path, 0, len(i)) |
| 601 | for _, n := range i { |
| 602 | pa = append(pa, p[n]) |
| 603 | } |
| 604 | return pa |
| 605 | } |
| 606 | |
| 607 | // linearPathsIn returns the linear paths in g created from p. |
| 608 | // If g contains any cycles linearPaths will panic. |
no outgoing calls