Skip to content

Commit 611990a

Browse files
committed
Adds README
1 parent 073991b commit 611990a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Combinatorial_lib for java
2+
The aim of this library is to provide an interface
3+
similar to `itertools` in python.
4+
5+
### Example Usages
6+
#### Combinations
7+
To iterate over all combinations of `k` objects from a `List<T> list` just use
8+
`CombinationGenerator.generateCombinations(list,k)`
9+
````java
10+
for (List<T> possibleCombinations :
11+
CombinationGenerator.generateCombinations(list,k)) {
12+
//perform operations on your combinations
13+
}
14+
````
15+
#### Permutations
16+
To iterate over all permutations of `k` objects from a `List<T> list` just use
17+
`CombinationGenerator.generateCombinations(list,k)`
18+
````java
19+
for (List<T> possiblePermutations :
20+
PermutationGenerator.generatePermutations(list,k)) {
21+
//perform operations on your permutations
22+
}
23+
````

0 commit comments

Comments
 (0)