![JAR search and dependency download from the Maven repository](/logo.png)
org.paukov.combinatorics3.IntegerPartitionGenerator 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
Simple java library to generate permutations, combinations and other combinatorial sequences
/**
* Combinatorics Library 3
* Copyright 2009-2016 Dmytro Paukov [email protected]
*/
package org.paukov.combinatorics3;
import java.util.*;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
class IntegerPartitionGenerator implements IGenerator> {
final Integer value;
IntegerPartitionGenerator(Integer value) {
this.value = value;
}
@Override
public Iterator> iterator() {
return new IntegerPartitionIterator(this);
}
@Override
public Stream> stream() {
return StreamSupport.stream(Spliterators.spliteratorUnknownSize(iterator(), 0), false);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy