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:
parent
4e6dd07e78
commit
5e144553fd
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user