Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions internal/strdist/strdist.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ func StandardCost(ar, br rune) Cost {
// Distance returns the edit distance between two strings. The cost per edit is
// given by the costFunc argument.
//
// There is an optional cut argument that when set will finish the computation
// as early as possible once the final cost is certain to be >= cut. There is
// no guarantee about the exact cost returned when this is the case other than
// being >= cut. In particular, when cut is used, the function is not symmetric
// on a and b.
// When cut > 0, the computation will finish as early as possible once the
// final cost is certain to be >= cut. There is no guarantee about the exact
// cost returned when this is the case other than being >= cut. In particular,
// when cut is used, the function is not symmetric on a and b.
func Distance(a, b string, f CostFunc, cut int64) int64 {
if a == b {
return 0
Expand Down
Loading