1
1
mirror of https://github.com/github/semantic.git synced 2024-12-03 00:16:52 +03:00
Commit Graph

10828 Commits

Author SHA1 Message Date
Rob Rix
bdb1670f67 Move the ! overload to the top level. 2017-03-23 10:13:40 -04:00
Rob Rix
83efbb56b6 Extract the setK evaluator. 2017-03-23 10:10:40 -04:00
Rob Rix
03808897cf Extract the getK evaluator. 2017-03-23 10:08:47 -04:00
Rob Rix
3106894876 Extract the moveFromAdjacent evaluator. 2017-03-23 10:07:48 -04:00
Rob Rix
b477a93dba Extract the searchAlongK evaluator. 2017-03-23 10:06:53 -04:00
Rob Rix
2b1bf43a1e Pop a couple of call stacks. 2017-03-23 10:05:27 -04:00
Rob Rix
f0e21a1cb4 Extract the searchUpToD evaluator. 2017-03-23 10:05:07 -04:00
Rob Rix
27a608ad7b Extract the editDistance evaluator. 2017-03-23 10:04:07 -04:00
Rob Rix
5955e7665d Extract the SES evaluator. 2017-03-23 10:03:03 -04:00
Rob Rix
2ef802e8d7 Extract the failure function to the top level. 2017-03-23 10:02:06 -04:00
Rob Rix
97a6028318 Extract the runLCS evaluator. 2017-03-23 10:00:11 -04:00
Rob Rix
7fe2522e4d 🔥 the shared graph/n/m bindings. 2017-03-23 09:55:56 -04:00
Rob Rix
b9e8fd3e7a Store inputs & state in arrays instead of vectors. 2017-03-23 09:01:49 -04:00
Rob Rix
f2f5af7d6a 🔥 divideGraph. 2017-03-23 08:55:29 -04:00
Rob Rix
ce5af997c9 Test that our implementation of Myers’ algorithm is lossless. 2017-03-22 17:26:05 -04:00
Rob Rix
ec2c0c703c Renae the disjoint input test. 2017-03-22 17:20:37 -04:00
Rob Rix
1893d2da16 Don’t attempt moves from out-of-bounds diagonals. 2017-03-22 17:18:17 -04:00
Rob Rix
35fb0f62ce Rename FindDPath to MoveFromAdjacent. 2017-03-22 16:47:58 -04:00
Rob Rix
6bcc0322f7 Skip out-of-bounds values of k. 2017-03-22 16:40:13 -04:00
Rob Rix
1b4e47ca2b Skip diagonals < -m. 2017-03-22 16:21:36 -04:00
Rob Rix
03f1854c7d Skip diagonals > n. 2017-03-22 16:19:06 -04:00
Rob Rix
aa4aa4438f Bounds-check insertions/deletions. 2017-03-22 16:18:49 -04:00
Rob Rix
bd766c70d6 Simplify how we insert/delete elements. 2017-03-22 15:55:22 -04:00
Rob Rix
a520062e37 We build up the edit script backwards, so reverse it. 2017-03-22 15:40:52 -04:00
Rob Rix
210ac2b0b0 Test that the edit distance is respected. 2017-03-22 15:38:57 -04:00
Rob Rix
d5bd9537dc Search up to m + n. 2017-03-22 15:31:17 -04:00
Rob Rix
de67e0491e Allocate exactly m + n + 1 state slots. 2017-03-22 15:27:18 -04:00
Rob Rix
27b0b28954 🔥 the reverse path & control flow. 2017-03-22 15:25:50 -04:00
Rob Rix
fdc2f551c4 Offset the y coordinates of reverse endpoints. 2017-03-21 15:18:01 -04:00
Rob Rix
68a3d5fe16 Extract the index function to the top level. 2017-03-21 12:02:53 -04:00
Rob Rix
d96931157f Reformat an if statement. 2017-03-20 13:04:06 -04:00
Rob Rix
bbb95ff030 Add an explicit step for the overlaps check. 2017-03-20 12:46:45 -04:00
Rob Rix
6e0104dbd0 Throw an exception explicitly when failing to find the middle snake. 2017-03-20 11:57:43 -04:00
Rob Rix
10ef21b7c8 Select the correct diagonal in the opposing edit graph. 2017-03-20 11:48:49 -04:00
Rob Rix
54bd6a2a4c The reverse edit graph is centred around k = 0.
This means that we will need to translate between the different diagonal coordinates when looking for overlap, but we won‘t need to adjust the boundaries checked when finding the furthest endpoint along some diagonal k.
2017-03-20 11:45:07 -04:00
Rob Rix
2556e0f1e1 Test that comparisons of the empty list against a list returns all values in That. 2017-03-20 11:32:03 -04:00
Rob Rix
2f86a8d374 Test that comparisons of a list against the empty list returns all values in This. 2017-03-20 11:31:06 -04:00
Rob Rix
67ddbae36c Test that equal lists are returned in These. 2017-03-20 11:29:16 -04:00
Rob Rix
093f3b9508 Stub in a spec for Myers’ algorithm. 2017-03-20 11:25:58 -04:00
Rob Rix
8d4e54a3fa Avoid recomputing endpoints where feasible. 2017-03-20 11:21:20 -04:00
Rob Rix
e7c954bccc getK returns an endpoint. 2017-03-20 11:19:18 -04:00
Rob Rix
d4b00fa24a Bounds-check before getting the (k ± 1)th diagonal. 2017-03-20 10:35:10 -04:00
Rob Rix
4e42d96e0c Look up the result in the exiting diagonal. 2017-03-20 10:10:09 -04:00
Rob Rix
26dc1c82a3 Use the makeEditGraph convenience in SES. 2017-03-20 09:58:37 -04:00
Rob Rix
1b1ecc20a7 Add a convenience constructor for edit graphs. 2017-03-20 09:43:55 -04:00
Rob Rix
d82061ce7c Clean up inInterval with inRange. 2017-03-17 10:47:56 -04:00
Rob Rix
c330c4a44b Clean up addFor with the direction eliminator. 2017-03-17 10:37:56 -04:00
Rob Rix
05d2ead9b1 🔥 the diagonalFor helper. 2017-03-17 10:37:00 -04:00
Rob Rix
e63935ae09 🔥 the edit distance for direction helper. 2017-03-17 10:36:12 -04:00
Rob Rix
3044fa3a8f Clean up SetK with the direction eliminator. 2017-03-17 10:34:37 -04:00