GitHub user nwellnhof opened a pull request:
https://github.com/apache/lucy-clownfish/pull/12
CLOWNFISH-39 Public Vector API
Fixes CLOWNFISH-39.
One of the changes to make Sort_quicksort work with size_t indices is
extremely ugly. We could also use `ssize_t` but this requires a feature test to
make it portable.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/nwellnhof/lucy-clownfish
CLOWNFISH-39-vector-api
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucy-clownfish/pull/12.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #12
----
commit 5124e36c0b42d73882ac16cb308d86cf5b2da39d
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T10:04:58Z
Remove VA_Shift
This is a rarely used and unefficient opeeration. It can be replaced with:
Obj *elem = INCREF(VA_Fetch(array, 0)); // optional
VA_Excise(array, 0, 1);
commit ea40da6d91a558b316468d74d7855b3fbeca3e25
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T10:25:59Z
Replace VA_Unshift with VA_Insert
commit c43c1bc0373d3a4e75bee1a9b5ae0fc71118bc73
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T11:54:22Z
Refactor helper to grow arrays
commit 35f8fbf59d13af5fe34f3a3c82c9cbbe5db9c059
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T11:56:16Z
Implement VA_Insert_All
TODO: Write tests.
commit 5b017ee399667d17521e321f00e40b4e5667b074
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T11:58:21Z
Rename Push_VArray to Push_All
commit a75e2bc4e934706137eb44b496e1ac9cc1fcbe36
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T11:59:02Z
Fix typo in documentation
commit 54c42e44ddb11f7730b05fda6e5ce93c26e17fa1
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T12:03:20Z
Remove support for custom array sort
commit 790694a8606e02372bad6cdcda82ad0d886083cf
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T12:11:39Z
Make VA_Shallow_Copy the default Clone operation
commit a13b874d8038ba4093fa264d00c498a7e9427a5d
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T12:14:18Z
Remove VA_Gather
commit 87ffd92f3f12b4b17a58499cb9dca1807bbbe632
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T13:12:27Z
Hoist some indirections out of loops
commit ab880391a19533eed96a7b09a26a4cd29d403b29
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T15:54:39Z
Don't use negative i index in quicksort
commit 67fb2ea43da223421b0f38279f7866eaa1901672
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T15:57:05Z
Don't use negative p index in quicksort
This also fixes a harmless off-by-one error when moving the equal
elements.
commit 27707a3fc478ec4bc423bbe87c2b29a93850c131
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T16:07:08Z
Avoid overflow when calculating midpoint in mergesort
commit 38422d12ca5ebf1e98b2c6a582a1e872d8da3fa7
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T17:11:35Z
Exit quicksort earlier
commit 0e2bdaf6b957079742444edc99fef5709ed8f31f
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T17:18:00Z
Switch to size_t indices in sort functions
The check for `(size_t)-1` is a horrible hack.
commit 7c88b32d7ee89baddf98edff95831b300a1735a3
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T17:21:48Z
Make VA_Sort stable
Switch to mergesort.
commit 3fb61a74de64263bd0f7d6bb00419c09638e2ba6
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T17:34:25Z
Rename VArray to Vector
New nickname is "Vec".
commit 9423582de4da212ea2d17b9ee423ba6a1eda94d8
Author: Nick Wellnhofer <[email protected]>
Date: 2015-04-26T18:10:49Z
Make Vector API public
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---