-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:psaia/kcomb
- Loading branch information
Showing
1 changed file
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
# kcomb | ||
|
||
kcomb implements a variation of [n choose k](https://en.wikipedia.org/wiki/Binomial_coefficient) in order | ||
to compute every possible distinct combination of values within a streamable series of columns. | ||
Compute (and stream/generate) every possible combination within N sets of data using an implementation of [n choose k](https://en.wikipedia.org/wiki/Binomial_coefficient). | ||
|
||
This could be useful when doing something like generating every possible template string given a set of | ||
values for each variable in the template. | ||
values for each variable in the template. This works even when the number of variables per template is unknown. | ||
|
||
When working with larger sets, this can be resource intensive as results could be in the millions+. The `CombineGenerator` func will allow you to create a pipeline and efficently iterate without eating much CPU or memory. | ||
|
||
See [tests](kcomb_test.go) and the [demo](demo/main.go) for usage and benchmarking. | ||
|
||
|
||
``` | ||
go get -u github.com/psaia/kcomb | ||
``` | ||
|
||
See [tests](kcomb_test.go) and the [demo](demo/main.go) for usage and benchmarking. | ||
|
||
![data stream](demo/fruit.gif) |