Tim Vermeulen
4f7cd340cd
Index offsetting for Product2 ( #66 )
2021-02-12 06:48:40 -08:00
Iceman
1a3c7061de
Fix RandomSample crash when 0 was out from random. ( #70 )
2021-02-12 06:41:26 -08:00
Matt Zanchelli
d8a11e0d51
All permutations ( #56 )
...
Adds the ability to easily get permutations of a range of sizes, like #51 did for Combinations.
2021-02-12 06:32:32 -08:00
Matt Zanchelli
d2a1ca5f7b
Lowercase suffix(while:) to match the case of the actual function name ( #76 )
2021-02-10 20:45:56 -06:00
Nate Cook
52e1e0e45a
add suffix:while method ( #65 )
2021-02-09 13:00:17 -06:00
michiboo
3b511072a6
Fix suffix tests
2021-02-09 12:56:08 -06:00
Nate Cook
cda6fddada
Merge pull request #61 from LucianoPAlmeida/normalizing-assert
...
[NFC] Using precondition instead of assert in calls that do not allow negative values
2021-01-28 10:08:09 -06:00
michiboo and Xiaodi Wu
f9a4f79027
Update Sources/Algorithms/Suffix.swift
...
Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com >
2021-01-28 15:22:18 +02:00
michiboo and Xiaodi Wu
2f8f798d0c
Update Sources/Algorithms/Suffix.swift
...
Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com >
2021-01-24 21:54:14 +08:00
michiboo and Xiaodi Wu
60bad3bbf4
Update Sources/Algorithms/Suffix.swift
...
Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com >
2021-01-23 14:39:02 +08:00
michiboo
08e424ea07
add doc on suffix method
2021-01-23 08:38:12 +02:00
michiboo
813ea7905e
add more test for suffix Tests
2021-01-22 16:17:28 +02:00
michiboo
1acc2136d9
add test for suffix
2021-01-20 15:23:38 +02:00
michiboo
9ef531f23f
add suffix while method
2021-01-20 15:16:25 +02:00
Nate Cook
d872b648f4
Merge pull request #57 from ollieatkinson/patch-1
...
Update README.md to add slidingWindows(ofCount:) and striding(by:)
2021-01-15 22:49:04 -06:00
Nate Cook
9836a4f80b
[Chunked] Add chunks(of:) variant that divides a collection in chunks of a given size ( #54 )
2021-01-15 22:43:13 -06:00
Luciano Almeida
34d7a55d1a
[NFC] Using precondition instead of assert in calls that do not allow negative values
2021-01-15 20:15:52 -03:00
Luciano Almeida
ad8d6ed7a1
[Chunks] Add chunks(ofCount:) in the readme
2021-01-15 07:53:21 -03:00
Luciano Almeida
14f09e4228
[Chunked] Improving index(offset:limit:) to avoid distance call
2021-01-15 07:48:11 -03:00
Luciano Almeida
622703b97f
[Chunked] Improve tests for ChunksOfCount traversal
2021-01-14 22:56:28 -03:00
Matt Zanchelli
5b7993ca8d
All combinations ( #51 )
...
Add an overload of combinations(ofCount:) that accepts a range.
2021-01-14 13:32:47 -06:00
Oliver Atkinson and Xiaodi Wu
b18a659ab5
Update README.md
...
Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com >
2021-01-14 17:26:41 +00:00
Luciano Almeida
f89fe8fad1
[Chunked] Code review adjustments
2021-01-13 23:06:19 -03:00
Oliver Atkinson
f0dba1433f
Update README.md
...
Adds `slidingWindows(ofCount:)` and `striding(by:)` to README.md
2021-01-12 20:07:01 +00:00
Luciano Almeida
05df988369
[Chunked] Minor adjustments on tests
2021-01-10 17:18:49 -03:00
Luciano Almeida
afac704540
[Chunked] Implemeting of ChunkedByCount index(offsetBy:)
2021-01-09 00:17:49 -03:00
Luciano Almeida
79aeb24e9d
Fixing review comments
2021-01-08 08:21:01 -03:00
Luciano Almeida
3092eb1304
[Chucked] Add chunks(ofCount:) information on the Chunked guides
2021-01-08 00:09:07 -03:00
Luciano Almeida
e0fed41419
[Chunked] Adding tests for chunks of count collection implementation
2021-01-08 00:08:21 -03:00
Luciano Almeida
505b57369f
[Chunked] Implementing chunked collection by a given count
2021-01-08 00:07:46 -03:00
Rafael Machado
3864606e00
Add "sortedPrefix(_:by)" to Collection ( #9 )
2020-12-04 10:20:28 -06:00
Nate Cook
e1c421c568
Fix typo
2020-12-04 10:16:09 -06:00
Nate Cook
638869256a
Add a few missing doc comments.
2020-12-02 16:28:23 -06:00
Tim Vermeulen
99152ecc68
Unify chunked(by:) and chunked(on:) ( #44 )
...
* Unify the eager `chunked(on:)` and `chunked(by:)`
* Unify the lazy `chunked(on:)` and `chunked(by:)`
* Trap when going past the end
* Add preconditions in `index(before:)`/`index(after:)`
2020-12-02 15:25:50 -06:00
Markus Winter
7af7ac2599
Clean up some comments ( #49 )
2020-12-02 10:21:06 -06:00
Nate Cook
ff01a02c07
Add Stride for Collection ( #24 )
2020-12-01 17:54:00 -06:00
Daniel Tull
93c8724c72
Add conformances to LazySequenceProtocol and LazyCollectionProtocol ( #47 )
...
* Conform Intersperse to LazySequenceProtocol when the base sequence does
* Add conformance to LazyCollectionProtocol
* Conform Indexed to LazyCollectionProtocol when Base conforms
* Rename XCTAssertLazy to XCTAssertLazySequence
* Add XCTAssertLazyCollection
* Add lazy test for Intersperse
* Update Indexed guide
* Add lazy conformances to SlidingWindows
* Update SlidingWindows guide
2020-12-01 15:47:13 -06:00
Tim Vermeulen
ad6dc7a143
Add random-access methods to SlidingWindows ( #42 )
2020-11-12 11:30:32 -06:00
Daniel Tull
fd189aa078
Add interspersed(with:) ( #35 )
2020-11-09 09:44:23 -06:00
Tim Vermeulen
6933a3157b
Avoid unnecessary computations in Product.distance(from:to:) ( #40 )
2020-11-06 15:06:23 -06:00
Oliver Atkinson
dfcc611e1d
consistant negative stride
2020-11-06 15:52:42 +00:00
Oliver Atkinson
3669ff0c11
offsetBackward n is positive and remove init? from Index
2020-11-06 15:33:03 +00:00
Oliver Atkinson
0a6bcc3c68
compute the stride only when the next element is requested
2020-11-06 15:25:34 +00:00
Oliver Atkinson
92b2846345
Add unbounded striding tests to check empty and sequence implementation
2020-11-06 10:42:38 +00:00
Oliver Atkinson
377bb72f0a
small documentation tweek collection -> sequence
2020-11-06 10:31:40 +00:00
Oliver Atkinson
28bbed8776
Add implementation for Sequence iterator
2020-11-06 10:13:29 +00:00
Oliver Atkinson
6f7148d966
Implementation of feedback from @timvermeulen
2020-11-06 09:46:06 +00:00
Oliver Atkinson
dcdef508c0
make base and stride internal
2020-11-02 10:02:17 +00:00
Oliver Atkinson
4a194ca811
remove redundant limit
2020-11-01 20:39:18 +00:00
Oliver Atkinson
6df6133ab7
Refactor to index(_:offsetBy:limitedBy:) and utilise the new test utilities for validateIndexTraversals
2020-11-01 20:30:17 +00:00