1
1
mirror of https://github.com/github/semantic.git synced 2024-12-19 04:41:47 +03:00
Commit Graph

57 Commits

Author SHA1 Message Date
Rob Rix
b276045348 Remove cons. 2015-11-12 16:13:31 -05:00
Rob Rix
82a8f095cf Inline calls to cons. 2015-11-12 16:13:23 -05:00
Rob Rix
4a356a8a0a Remove costOfStream. 2015-11-12 16:10:23 -05:00
Rob Rix
b8fb48d723 Remove min. 2015-11-12 16:10:19 -05:00
Rob Rix
dac24bbf24 µ-optimizations for SES.
1. Avoid redundant computations of cost on the fast path (equal
elements at this vertex).

2. Don’t call `min`; inline the branches instead.

3. Don’t call `costOfStream`; inline the costs instead.
2015-11-12 16:09:53 -05:00
Rob Rix
5253de2ef5 Inline stream costs. 2015-11-12 15:58:14 -05:00
Rob Rix
17b9c0a9ec Fast fail on out of bounds diagonals. 2015-11-12 15:58:03 -05:00
Rob Rix
84ed21b1a2 Generalize SES to arbitrary CollectionType. 2015-11-05 16:14:10 -05:00
Rob Rix
f4a8bcdc90 Correct the Matrix sizing. 2015-11-05 16:04:39 -05:00
Rob Rix
c0002c47e6 Use successors rather than integer addition. 2015-11-05 15:52:38 -05:00
Rob Rix
6a0068362e Subscript with the correct indices. 2015-11-05 15:51:50 -05:00
Rob Rix
217a2c5a50 Define Matrix over two ranges. 2015-11-05 15:51:15 -05:00
Rob Rix
fdfdeb0dbf SES operates over a pair of ranges. 2015-11-05 15:46:36 -05:00
Rob Rix
3f5812bef5 Explicitly convert the bounds to Int. 2015-11-05 15:40:33 -05:00
Rob Rix
73f094cc29 Document the early return. 2015-10-29 13:16:16 -04:00
Rob Rix
17d0582331 Short-circuit cost computations for equal terms.
This is an optimization for SES allowing it to short-circuit cost
computations when it encounters equal terms.
2015-10-29 11:23:25 -04:00
Rob Rix
750def8107 Fix up some comments. 2015-10-22 10:37:00 -04:00
Rob Rix
c9b33f826c Add an annotation parameter to Free. 2015-10-22 10:30:38 -04:00
Rob Rix
c5e01c41db Rename SES’ A type parameter to Leaf. 2015-10-22 10:28:22 -04:00
Josh Vera
e6ec91cd64 Merge pull request #120 from github/patch-constructors-on-diff
Patch constructors on diff
2015-10-15 15:39:14 -04:00
Rob Rix
d74e4fb231 Missed a couple of cases in SES. 2015-10-15 11:20:41 -04:00
Rob Rix
fed0d91d30 Use the patch constructors in SES. 2015-10-15 11:19:14 -04:00
Rob Rix
7c099bac6f Parameterize SES by the cost function. 2015-10-14 18:51:18 -04:00
Josh Vera
df31170dc8 Merge pull request #107 from github/generalize-patch
Generalize Patch
2015-10-14 16:47:57 -04:00
Rob Rix
09fad58fd7 Correct a comment. 2015-10-14 12:46:16 -04:00
Rob Rix
517c87c303 Revert "Revert "SES does not take an equality test.""
This reverts commit bb73f6eac2b59599607369767e9e221e7e5e0f15.
2015-10-14 12:28:45 -04:00
Rob Rix
a7f4d91d56 Revert "SES does not take an equality test."
This reverts commit 1db8bdf82c85a490188882b810cd9c516e4f210e.

Conflicts:
	prototype/Doubt/SES.swift
	prototype/DoubtTests/SESTests.swift
2015-10-14 12:25:38 -04:00
Rob Rix
8d4a91d3a9 Merge branch 'parameterize-algorithm-evaluation-by-comparison-restriction' into generalize-patch
Conflicts:
	prototype/Doubt/SES.swift
	prototype/DoubtTests/SESTests.swift
2015-10-14 12:24:04 -04:00
Rob Rix
0acdd16db3 Generalize SES to arbitrary arrays. 2015-10-14 12:18:49 -04:00
Rob Rix
34258b98b8 Generalize Patch from Fix<A> to A. 2015-10-14 12:17:39 -04:00
Rob Rix
e33f733d83 SES does not take an equality test. 2015-10-14 12:14:15 -04:00
Rob Rix
da11e0983a Don’t test equality in SES. 2015-10-14 12:11:03 -04:00
Rob Rix
24bf8f4497 Merge branch 'parameterize-algorithm-evaluation-by-comparison-restriction' into charge-a-constant-cost-to-patches 2015-10-13 18:35:43 -04:00
Rob Rix
ee0f8765aa Charge a constant cost to Patches. 2015-10-13 18:19:56 -04:00
Rob Rix
92cb10379f Document the decision a little further. 2015-10-13 17:55:47 -04:00
Rob Rix
9f498f1099 Formatting. 2015-10-13 17:55:02 -04:00
Rob Rix
10122d62da Abbreviate the selection of the best outgoing edge. 2015-10-13 17:53:04 -04:00
Rob Rix
6cbe0a18d3 Extract diagonal. 2015-10-13 17:51:03 -04:00
Rob Rix
32bfdc6766 Factor out right/down. 2015-10-13 17:50:22 -04:00
Rob Rix
e09d46d109 nil responses restrict the traversal of diagonal edges. 2015-10-13 17:45:22 -04:00
Rob Rix
90b22cf9a8 Allow recurrence to opt out of comparing nodes by returning nil. 2015-10-13 17:40:14 -04:00
Rob Rix
5bf82fd366 🔥 Memo and Stream. 2015-10-13 00:51:43 -04:00
Rob Rix
4bcc773fc6 🔥 chaff. 2015-10-07 13:13:51 -04:00
Rob Rix
c2b00c2230 Nominate the best interior edge using compare-parametric min. 2015-10-07 13:13:32 -04:00
Rob Rix
47dec5546d Restore the compare-parametric min function. 2015-10-07 13:09:22 -04:00
Rob Rix
10ddaab0ed Use values instead of mapping. 2015-10-07 13:04:03 -04:00
Rob Rix
c9d51049df Construct with Diff(), not copy(). 2015-10-06 17:47:04 -04:00
Rob Rix
de61021d32 Once more, call it Term. 2015-10-06 17:46:37 -04:00
Rob Rix
d097f14fcb Explain SES implementation details a little. 2015-10-06 17:36:49 -04:00
Rob Rix
6030731cc8 Extend the graph and return Stream.Nil at the end. 2015-10-06 17:36:41 -04:00