MCPcopy
hub / github.com/google/go-cmp / Dist

Method Dist

cmp/internal/diff/diff.go:82–82  ·  view source on GitHub ↗

Dist is the Levenshtein distance and is guaranteed to be 0 if and only if lists X and Y are equal.

()

Source from the content-addressed store, hash-verified

80// Dist is the Levenshtein distance and is guaranteed to be 0 if and only if
81// lists X and Y are equal.
82func (es EditScript) Dist() int { return len(es) - es.stats().NI }
83
84// LenX is the length of the X list.
85func (es EditScript) LenX() int { return len(es) - es.stats().NY }

Callers 1

FormatDiffSliceMethod · 0.80

Calls 1

statsMethod · 0.95

Tested by

no test coverage detected