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

Method clone

plotter/johnson.go:261–272  ·  view source on GitHub ↗

clone returns a deep copy of the graph g.

()

Source from the content-addressed store, hash-verified

259
260// clone returns a deep copy of the graph g.
261func (g graph) clone() graph {
262 c := make(graph, len(g))
263 for u, e := range g {
264 for v := range e {
265 if c[u] == nil {
266 c[u] = make(set)
267 }
268 c[u][v] = struct{}{}
269 }
270 }
271 return c
272}

Callers 1

cyclesInFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected