Skip to content
This repository was archived by the owner on Mar 9, 2023. It is now read-only.

Fix connection cost lookup, fix #129#131

Merged
sorami merged 2 commits intoWorksApplications:developfrom
polm:fix-costs
Jun 18, 2020
Merged

Fix connection cost lookup, fix #129#131
sorami merged 2 commits intoWorksApplications:developfrom
polm:fix-costs

Conversation

@polm
Copy link
Contributor

@polm polm commented Jun 18, 2020

The connection costs lookup was backwards.

There was a comment in the pre-cython code that the call to the cost
lookup function looked backwards, but was actually correct. It was
calling with (l_node.right_id, r_node.left_id). I kept this order when I
replaced the function call with a memoryview access, but that was wrong;
I hadn't noticed that the access function was actually reversing the
order of its arguments.

This fix was verified by checking the tokenization of a short document
vs v0.4.5 and making sure there were no changes.

polm added 2 commits June 18, 2020 10:47
The connection costs lookup was backwards.

There was a comment in the pre-cython code that the call to the cost
lookup function looked backwards, but was actually correct. It was
calling with (l_node.right_id, r_node.left_id). I kept this order when I
replaced the function call with a memoryview access, but that was wrong;
I hadn't noticed that the access function was actually reversing the
order of its arguments.

This fix was verified by checking the tokenization of a short document
vs v0.4.5 and making sure there were no changes.
@sorami sorami self-requested a review June 18, 2020 03:36
@sorami
Copy link
Collaborator

sorami commented Jun 18, 2020

@polm
Thank you very much for the super-fast fix. Let me check and merge.

@sorami sorami merged commit 6276fa9 into WorksApplications:develop Jun 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants