1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 08:25:19 +03:00

Remove costOfStream.

This commit is contained in:
Rob Rix 2015-11-12 16:10:23 -05:00
parent b8fb48d723
commit 4a356a8a0a

View File

@ -11,10 +11,6 @@ public func SES<Leaf, Annotation, C: CollectionType>(a: C, _ b: C, cost: Free<Le
return .Cons((diff, cost(diff) + (rest.value.first?.1 ?? 0)), rest)
}
func costOfStream(stream: Memo<Stream<(Diff, Int)>>) -> Int {
return stream.value.first?.1 ?? 0
}
// A matrix whose values are streams representing paths through the edit graph, carrying both the diff & the cost of the remainder of the path.
var matrix: Matrix<Stream<(Diff, Int)>, C.Index>!
matrix = Matrix(across: a.startIndex..<a.endIndex.successor(), down: b.startIndex..<b.endIndex.successor()) { i, j in