MCPcopy
hub / github.com/google/mangle / String

Method String

unionfind/unionfind.go:50–64  ·  view source on GitHub ↗

String returns a readable debug string for this UnionFind object.

()

Source from the content-addressed store, hash-verified

48
49// String returns a readable debug string for this UnionFind object.
50func (uf UnionFind) String() string {
51 var sb strings.Builder
52 sb.WriteRune('{')
53 for k, v := range uf.parent {
54 if k.Equals(v) {
55 continue
56 }
57 sb.WriteRune(' ')
58 sb.WriteString(k.String())
59 sb.WriteString("->")
60 sb.WriteString(v.String())
61 }
62 sb.WriteString(" }")
63 return sb.String()
64}
65
66// Adds an edge.
67func (uf UnionFind) union(s ast.BaseTerm, t ast.BaseTerm) {

Callers

nothing calls this directly

Calls 2

EqualsMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected