org.paukov.combinatorics3.CombinationGenerator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of combinatoricslib3 Show documentation
Show all versions of combinatoricslib3 Show documentation
Combinatorial objects stream generators for Java.
/**
* Combinatorics Library 3
* Copyright 2009-2016 Dmytro Paukov [email protected]
*/
package org.paukov.combinatorics3;
import java.util.Collection;
import java.util.List;
public class CombinationGenerator {
final Collection originalVector;
CombinationGenerator(Collection originalVector) {
this.originalVector = originalVector;
}
public IGenerator> simple(int length) {
return new SimpleCombinationGenerator<>(originalVector, length);
}
public IGenerator> multi(int length) {
return new MultiCombinationGenerator<>(originalVector, length);
}
}