1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 11:02:26 +03:00

Add a function to compute the cost of the rest of the diff.

This commit is contained in:
Rob Rix 2015-10-06 11:48:04 -04:00
parent 4e6dd07e78
commit 5e144553fd

View File

@ -118,6 +118,15 @@ public enum FreeAlgorithm<A, B> {
}
}
let sum: Stream<(Diff, Int)> -> Int = {
switch $0 {
case .Nil:
return 0
case let .Cons((_, i), _):
return i
}
}
var matrix: Matrix<Stream<(Diff, Int)>>!
matrix = Matrix(width: a.count, height: b.count) { i, j in
let right = matrix[i + 1, j]