{"action":"published","release":{"url":"https://api.github.com/repos/lorentey/BTree/releases/2754888","assets_url":"https://api.github.com/repos/lorentey/BTree/releases/2754888/assets","upload_url":"https://uploads.github.com/repos/lorentey/BTree/releases/2754888/assets{?name,label}","html_url":"https://github.com/lorentey/BTree/releases/tag/v2.0.0","id":2754888,"tag_name":"v2.0.0","target_commitish":"master","name":"v2.0.0","draft":false,"author":{"login":"lorentey","id":608696,"avatar_url":"https://avatars.githubusercontent.com/u/608696?v=3","gravatar_id":"","url":"https://api.github.com/users/lorentey","html_url":"https://github.com/lorentey","followers_url":"https://api.github.com/users/lorentey/followers","following_url":"https://api.github.com/users/lorentey/following{/other_user}","gists_url":"https://api.github.com/users/lorentey/gists{/gist_id}","starred_url":"https://api.github.com/users/lorentey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorentey/subscriptions","organizations_url":"https://api.github.com/users/lorentey/orgs","repos_url":"https://api.github.com/users/lorentey/repos","events_url":"https://api.github.com/users/lorentey/events{/privacy}","received_events_url":"https://api.github.com/users/lorentey/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2016-03-06T17:50:43Z","published_at":"2016-03-06T19:04:33Z","assets":[],"tarball_url":"https://api.github.com/repos/lorentey/BTree/tarball/v2.0.0","zipball_url":"https://api.github.com/repos/lorentey/BTree/zipball/v2.0.0","body":"This is a major release that includes breaking API changes, plus major new features and bug fixes.\r\n\r\nThe package now implements all major features that were on my initial roadmap; further development will\r\nlikely concentrate on refining the API, improving performance and adapting the package to new Swift versions.\r\n(Although it is never too late to propose new features!)\r\n\r\nThis release supports Swift 2.1.1. \r\n\r\nSwift 2.2 is conditionally supported; add `-DSwift22` to the Swift compiler flags to enable it. Note that this version of the module will compile with a number of warnings on 2.2; these will be fixed when Swift 2.2 is released.\r\n\r\nSwift 3 is not yet supported. In particular, API names mostly follow Swift 2 conventions, although certain internal APIs are following the new API design conventions.\r\n\r\n## New Features\r\n\r\n### General\r\n\r\n- The README has been rewritten and greatly expanded in scope. It now includes a short intro and a detailed rationale section.\r\n- The term \"position\" has been systematically replaced with \"offset\" throughout the entire API and documentation.\r\n\r\n### `BTree`\r\n\r\n- The second component of `BTree`'s elements have been renamed from \"payload\" to \"value\" throughout the entire API and documentation. This is for consistency with other Swift key-value collections.\r\n- `BTree` now includes efficient set operations: `union`, `distinctUnion`, `subtract`, `exclusiveOr`, and `intersect`. These are based on keys, and exploit the order of elements to detect when they can skip elementwise processing for specific subtrees. `subtract` and `intersect` also have overloads for selecting for keys contained in a sorted sequence.\r\n- `BTree` now supports efficient tree comparison operations: `elementsEqual`, `isDisjointWith`, `isSubsetOf`, `isStrictSubsetOf`, `isSupersetOf`, and `isStrictSupersetOf`. All of these except the first work like set comparisons on the keys of the tree. They exploit the element order and detect shared nodes to skip over subtrees whenever possible. When `Value` is `Equatable`, you can now compare B-trees for equality using the `==` operator.\r\n- `BTreeKeySelector` now includes an `After` case, which selects first the element that has a key that is larger than the specified key. This is occasionally useful.\r\n- `BTree` now defines explicit overrides for the following methods on `SequenceType`: `prefix`, `suffix`, `prefixUpTo`, `prefixThrough`, `suffixFrom`, `dropLast`, `dropFirst`, `first`, `last`, `popFirst`, `popLast`, `removeFirst` and `removeLast`. \r\nThe new implementations perform better than the default, index-based implementations provided by `CollectionType`. There are also new overloads for key-based slicing.\r\n- `BTree` gained methods for starting a generator at any specific key, index or offset.\r\n- The `withCursor` family of methods now allow their closure to return a value.\r\n- `BTree.remove(:)` now returns the full element that was removed, not just the value component.\r\n- Bulk loading initializers of `BTree` now respect the original order of elements, and optionally allow filtering out elements with duplicate keys. When initializing a `Map` from a sequence that contains duplicates, only the last element is kept for any key.\r\n- New methods: `BTree.removeAtIndex(:)`, and  `BTree.removeAll()`\r\n- `BTreeIndex` now contains efficient O(log(n)) implementations for `advancedBy` and `distanceTo`, replacing their default O(n) variants.\r\n- `BTreeIndex` is now `Comparable`. However, comparing indices only makes sense if the indices belong to the same tree.\r\n- `BTreeCursor` now has an `element` property that allows you to get or update the entire (key, value) pair at the current position.\r\n\r\n### `OrderedSet`\r\n\r\n- `OrderedSet` is a new general-use wrapper around `BTree`, implementing a sorted analogue of `Set`.\r\n\r\n### `List`\r\n\r\n- The generator type of `List` has been renamed from `ListGenerator` to `BTreeValueGenerator`.\r\n- `List` explicitly implements `RangeReplaceableCollectionType`.\r\n- You can now use `+` to concatenate two `List` values, just like you can with `Array`s.\r\n\r\n### `Map`\r\n\r\n- `Map` now supports `elementsEqual`, complete with an `==` operator when its `Value` is `Equatable`.\r\n- `Map` gained two methods for offset-based removal of elements: `removeAtOffset` and `removeAtOffsets`\r\n- You can now merge two `Map` values into a single map using `merge`.\r\n- You can extract a submap from a `Map` that includes or excludes a specific set or sequence of keys.\r\n\r\n## Improvements\r\n\r\n- Navigation inside the B-tree is now unified under a single protocol, `BTreePath`, for all three flavors of tree paths: `BTreeStrongPath`, `BTreeWeakPath` and `BTreeCursorPath`.\r\n- The complexity of `BTree.endIndex` has been reduced from O(log(n)) to O(1). This also improves the `endIndex` properties of `Map` and `OrderedSet`.\r\n- Iterating over B-trees is now a bit faster, as getting to the successor of an item does not normally involve array lookups.\r\n- `BTree.shiftSlots` is a new internal method for shifting elements between nodes at the same level. This operation is often useful while reorganizing/rebalancing the tree.\r\n- The bulk loading algorithm has been extracted into a separate internal struct and generalized to allow appending full trees, not just elements.\r\n- The generated docs now include nice method group headers splitting the method lists into organized chunks.\r\n\r\n## Bug fixes\r\n\r\n- Fixed issue #3, \"Crash when inserting Element in List\".\r\n- The copy-on-write semantics of `BTree.withCursor(at: Index)` have been fixed.\r\n- `BTree` now never allows its arrays to get larger than their specified order. (Previously, `BTree.join` could allow arrays to grow twice the maximum size, leading to wasted capacity.)\r\n"}}