|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
| Packages that use Generator | |
|---|---|
| net.ericaro.neoitertools | |
| net.ericaro.neoitertools.generators | |
| net.ericaro.neoitertools.generators.combinatorics | |
| net.ericaro.neoitertools.generators.primitives | |
| Uses of Generator in net.ericaro.neoitertools |
|---|
| Methods in net.ericaro.neoitertools that return Generator | ||
|---|---|---|
static
|
Itertools.chain(Generator<Generator<T>> generators)
Make an generator that returns elements from the first iterable until it is exhausted, then proceeds to the next iterable, until all of the iterables are exhausted. |
|
static
|
Itertools.chain(Generator<T>... generators)
Chain together two generators. |
|
static
|
Itertools.combinations(Generator<T> generator,
int r)
Return r length subsequences of elements from the input generator. |
|
static Generator<java.lang.Integer> |
Itertools.count()
Make a generator that returns all the consecutive integers starting with 0. |
|
static Generator<java.lang.Integer> |
Itertools.count(int n)
Make an generator that returns consecutive integers starting with n. |
|
static
|
Itertools.cycle(Generator<T> generator)
Make an generator returning elements from the generator and saving a copy of each. |
|
static
|
Itertools.dropwhile(Lambda<T,java.lang.Boolean> predicate,
Generator<T> generator)
Make an generator that drops elements from the generator as long as the predicate is true. |
|
static
|
Itertools.enumerate(Generator<T> generator)
Return an Generator of Index object. |
|
static
|
Itertools.filter(Lambda<T,java.lang.Boolean> predicate,
Generator<T> generator)
Make an generator that filters elements from generator returning only those for which the predicate is True. |
|
static
|
Itertools.filterfalse(Lambda<T,java.lang.Boolean> predicate,
Generator<T> generator)
Make an generator that filters elements from generator returning only those for which the predicate is False. |
|
static
|
Itertools.groupby(Generator<T> generator,
Lambda<T,K> key)
Make an generator that returns consecutive keys and groups from the source generator. |
|
static Generator<java.lang.Boolean> |
Itertools.iter(boolean[] array)
Turns any boolean[] array into a generator |
|
static Generator<java.lang.Byte> |
Itertools.iter(byte[] array)
Turns any byte[] array into a generator |
|
static Generator<java.lang.Character> |
Itertools.iter(char[] array)
Turns any char[] array into a generator |
|
static Generator<java.lang.Character> |
Itertools.iter(java.lang.CharSequence seq)
Turns a CharSequence into an Generator |
|
static Generator<java.lang.Double> |
Itertools.iter(double[] array)
Turns any double[] array into a generator |
|
static Generator<java.lang.Float> |
Itertools.iter(float[] array)
Turns any float[] array into a generator |
|
static Generator<java.lang.Integer> |
Itertools.iter(int[] array)
Turns any int[] array into a generator |
|
static
|
Itertools.iter(java.lang.Iterable<T> iterable)
Turn any Iterable into a Generator |
|
static
|
Itertools.iter(java.util.Iterator<T> iterator)
Turn any Iterator into a Generator |
|
static Generator<java.lang.Long> |
Itertools.iter(long[] array)
Turns any long[] array into a generator |
|
static Generator<java.lang.Short> |
Itertools.iter(short[] array)
Turns any short[] array into a generator |
|
static
|
Itertools.iter(T[] t)
Turns any object array into an Generator |
|
static
|
Itertools.iter(Yield<java.lang.Void,T> yield)
Turns a Yield generator into a standard Generator. |
|
static
|
Itertools.map(Lambda<? super T,K> mapper,
Generator<T> sequence)
Apply Lambda to every item of sequence and return a Generator of the results. |
|
static
|
Itertools.permutations(Generator<T> generator)
Return successive full length permutations of elements in the generator. |
|
static
|
Itertools.permutations(Generator<T> generator,
int r)
Return successive r-length permutations of elements in the generator. |
|
static
|
Itertools.product(Generator<Generator<T>> generators)
Cartesian product of input sequences. |
|
static
|
Itertools.product(Generator<Generator<T>> generators,
int repeat)
Cartesian product of input sequences. |
|
static Generator<java.lang.Integer> |
Itertools.range(int end)
Equivalent to range(0, end, 1) |
|
static Generator<java.lang.Integer> |
Itertools.range(int start,
int end)
equivalent to range(start, end, 1) |
|
static Generator<java.lang.Integer> |
Itertools.range(int start,
int end,
int step)
This is a versatile function to create generator containing arithmetic progressions. |
|
static
|
Itertools.repeat(T object)
Make an generator that returns object over and over again. |
|
static
|
Itertools.repeat(T object,
int times)
Make an generator that returns object times times. |
|
static
|
Itertools.reversed(Generator<T> generator)
Return a reverse generator. |
|
static
|
Itertools.slice(Generator<T> generator,
int stop)
equivalent to Itertools.slice(net.ericaro.neoitertools.Generator(0, stop, 1); |
|
static
|
Itertools.slice(Generator<T> generator,
int start,
int stop)
equivalent to Itertools.slice(net.ericaro.neoitertools.Generator(start, stop, 1); |
|
static
|
Itertools.slice(Generator<T> generator,
int start,
int stop,
int step)
Make an generator that returns selected elements from the generator. |
|
static
|
Itertools.sorted(Generator<T> generator)
Returns a sorted Generator in natural ascending order of T. |
|
static
|
Itertools.sorted(Generator<T> generator,
java.util.Comparator<? super K> cmp,
Lambda<? super T,K> key,
boolean reverse)
Return a new sorted generator from the items in generator. |
|
static
|
Itertools.sorted(Generator<T> generator,
java.util.Comparator<? super T> cmp)
Return a new sorted generator from the items in generator. the comparator is used to sort the generator. |
|
static
|
Itertools.sorted(Generator<T> generator,
Lambda<T,K> key,
boolean reverse)
Return a new sorted generator from the items in generator. the Key Lambda is used to extract a key from T, and that key natural order is used to sort the whole generator. |
|
static
|
Itertools.takewhile(Generator<T> generator,
Lambda<? super T,java.lang.Boolean> predicate)
Make an generator that returns elements from the generator as long as the predicate is true. |
|
static
|
Itertools.zip(Generator<Generator<T>> generators)
This function returns an Generator of tuple (unmodifiable List) , where the i-th couple contains the i-th element from each of the argument
generators. |
|
static
|
Itertools.zip(Generator<T1> generator1,
Generator<T2> generator2)
This function returns an Generator of Pairs, where the i-th pair contains the i-th element from each of the argument generators. |
|
| Methods in net.ericaro.neoitertools that return types with arguments of type Generator | ||
|---|---|---|
static
|
Itertools.groupby(Generator<T> generator,
Lambda<T,K> key)
Make an generator that returns consecutive keys and groups from the source generator. |
|
static
|
Itertools.tee(Generator<T> generator,
int n)
Return n independent generators from a single iterable. |
|
| Methods in net.ericaro.neoitertools with parameters of type Generator | ||
|---|---|---|
static
|
Itertools.all(Generator<T> generator,
Lambda<? super T,java.lang.Boolean> predicate)
Return True if all elements of the generator are evaluated to true with the Predicate (or if the generator is empty). |
|
static
|
Itertools.any(Generator<T> generator,
Lambda<? super T,java.lang.Boolean> predicate)
Return True if any element of the generator is mapped to true. |
|
static
|
Itertools.chain(Generator<Generator<T>> generators)
Make an generator that returns elements from the first iterable until it is exhausted, then proceeds to the next iterable, until all of the iterables are exhausted. |
|
static
|
Itertools.chain(Generator<T>... generators)
Chain together two generators. |
|
static
|
Itertools.combinations(Generator<T> generator,
int r)
Return r length subsequences of elements from the input generator. |
|
static
|
Itertools.cycle(Generator<T> generator)
Make an generator returning elements from the generator and saving a copy of each. |
|
static
|
Itertools.dropwhile(Lambda<T,java.lang.Boolean> predicate,
Generator<T> generator)
Make an generator that drops elements from the generator as long as the predicate is true. |
|
static
|
Itertools.enumerate(Generator<T> generator)
Return an Generator of Index object. |
|
static
|
Itertools.filter(Lambda<T,java.lang.Boolean> predicate,
Generator<T> generator)
Make an generator that filters elements from generator returning only those for which the predicate is True. |
|
static
|
Itertools.filterfalse(Lambda<T,java.lang.Boolean> predicate,
Generator<T> generator)
Make an generator that filters elements from generator returning only those for which the predicate is False. |
|
static
|
Itertools.groupby(Generator<T> generator,
Lambda<T,K> key)
Make an generator that returns consecutive keys and groups from the source generator. |
|
static
|
Itertools.in(Generator<T> generator)
Turn a Generator into an Iterable. |
|
static
|
Itertools.list(Generator<T> generator)
Creates a List from a Generator |
|
static
|
Itertools.list(Generator<T> generator,
int max)
Creates a list from a generator, of size max |
|
static
|
Itertools.map(Lambda<? super T,K> mapper,
Generator<T> sequence)
Apply Lambda to every item of sequence and return a Generator of the results. |
|
static
|
Itertools.permutations(Generator<T> generator)
Return successive full length permutations of elements in the generator. |
|
static
|
Itertools.permutations(Generator<T> generator,
int r)
Return successive r-length permutations of elements in the generator. |
|
static
|
Itertools.product(Generator<Generator<T>> generators)
Cartesian product of input sequences. |
|
static
|
Itertools.product(Generator<Generator<T>> generators,
int repeat)
Cartesian product of input sequences. |
|
static
|
Itertools.reduce(Operator<T> operator,
Generator<T> generator)
Equivalent to reduce(operator, generator, null); |
|
static
|
Itertools.reduce(Operator<T> operator,
Generator<T> generator,
T initializer)
Apply function of two arguments cumulatively to the items of generator, from left to right, so as to reduce the generator to a single value. |
|
static
|
Itertools.reversed(Generator<T> generator)
Return a reverse generator. |
|
static
|
Itertools.slice(Generator<T> generator,
int stop)
equivalent to Itertools.slice(net.ericaro.neoitertools.Generator(0, stop, 1); |
|
static
|
Itertools.slice(Generator<T> generator,
int start,
int stop)
equivalent to Itertools.slice(net.ericaro.neoitertools.Generator(start, stop, 1); |
|
static
|
Itertools.slice(Generator<T> generator,
int start,
int stop,
int step)
Make an generator that returns selected elements from the generator. |
|
static
|
Itertools.sorted(Generator<T> generator)
Returns a sorted Generator in natural ascending order of T. |
|
static
|
Itertools.sorted(Generator<T> generator,
java.util.Comparator<? super K> cmp,
Lambda<? super T,K> key,
boolean reverse)
Return a new sorted generator from the items in generator. |
|
static
|
Itertools.sorted(Generator<T> generator,
java.util.Comparator<? super T> cmp)
Return a new sorted generator from the items in generator. the comparator is used to sort the generator. |
|
static
|
Itertools.sorted(Generator<T> generator,
Lambda<T,K> key,
boolean reverse)
Return a new sorted generator from the items in generator. the Key Lambda is used to extract a key from T, and that key natural order is used to sort the whole generator. |
|
static java.lang.String |
Itertools.string(Generator<java.lang.Character> chars)
Turn any Generator of Character into a String |
|
static java.lang.StringBuilder |
Itertools.stringBuilder(Generator<java.lang.Character> chars)
Turn any Generator of Character into a StringBuilder |
|
static
|
Itertools.takewhile(Generator<T> generator,
Lambda<? super T,java.lang.Boolean> predicate)
Make an generator that returns elements from the generator as long as the predicate is true. |
|
static
|
Itertools.tee(Generator<T> generator,
int n)
Return n independent generators from a single iterable. |
|
static
|
Itertools.tuple(Generator<T> generator)
Turns any Generator into a "tuple", here an unmodifiable List |
|
static
|
Itertools.zip(Generator<Generator<T>> generators)
This function returns an Generator of tuple (unmodifiable List) , where the i-th couple contains the i-th element from each of the argument
generators. |
|
static
|
Itertools.zip(Generator<T1> generator1,
Generator<T2> generator2)
This function returns an Generator of Pairs, where the i-th pair contains the i-th element from each of the argument generators. |
|
static
|
Itertools.zip(Generator<T1> generator1,
Generator<T2> generator2)
This function returns an Generator of Pairs, where the i-th pair contains the i-th element from each of the argument generators. |
|
| Method parameters in net.ericaro.neoitertools with type arguments of type Generator | ||
|---|---|---|
static
|
Itertools.chain(Generator<Generator<T>> generators)
Make an generator that returns elements from the first iterable until it is exhausted, then proceeds to the next iterable, until all of the iterables are exhausted. |
|
static
|
Itertools.product(Generator<Generator<T>> generators)
Cartesian product of input sequences. |
|
static
|
Itertools.product(Generator<Generator<T>> generators,
int repeat)
Cartesian product of input sequences. |
|
static
|
Itertools.zip(Generator<Generator<T>> generators)
This function returns an Generator of tuple (unmodifiable List) , where the i-th couple contains the i-th element from each of the argument
generators. |
|
| Uses of Generator in net.ericaro.neoitertools.generators |
|---|
| Classes in net.ericaro.neoitertools.generators that implement Generator | |
|---|---|
class |
ChainGenerator<T>
A generator that returns elements from the first generators until it is exhausted, then proceeds to the next generator, until all of the generators are exhausted. |
class |
CharSequenceGenerator
A Generator of Character read from any CharSequence. |
class |
CycleGenerator<T>
Make a Generator returning elements from the Generator and saving a copy of each. |
class |
DropWhileGenerator<T>
Drops item while the condition is true, and then start to return them. |
class |
EmptyGenerator<T>
A generator that returns nothing, never. |
class |
EnumerateGenerator<T>
convert a generator of T into a generator if Index |
class |
FilterGenerator<T>
Returns items from the generator iif the condition is true. |
class |
GenericArrayGenerator<T>
A Generator based on any Object Type array. |
class |
GroupByGenerator<K,T>
import there is a difference in implementation from the original python: in Python the generator returned in the Pair is dependent on the next() state, meaning that when you call next() the generator is no longer available. |
class |
IteratorGenerator<T>
A Generator using java Iterator as source. |
class |
MapGenerator<T,K>
A Generator that apply a mapping Lambda function first. |
class |
RangeGenerator
This is a versatile Generator containing arithmetic progressions. |
class |
RepeatGenerator<T>
a Generator that returns object over and over again. |
class |
SliceGenerator<T>
a Generator that returns selected elements from the Generator. |
class |
TakeWhileGenerator<T>
a Generator that returns elements from the Generator as long as the predicate is true. |
class |
TeeGeneratorFactory.TeeGenerator
|
class |
YieldGenerator<T>
A Generator based on a Yield statement. |
class |
ZipGenerator<T>
an Generator of Pairs, where the i-th couple contains the i-th
element from each of the argument Generator. |
class |
ZipPairGenerator<T1,T2>
an Generator of Pairs, where the i-th couple contains the i-th
element from each of the argument Generator. |
| Methods in net.ericaro.neoitertools.generators that return Generator | |
|---|---|
Generator<T> |
TeeGeneratorFactory.newInstance()
every iterator returned will start iterating over the source at its current position, this depend on the current state of every iterator. |
| Methods in net.ericaro.neoitertools.generators that return types with arguments of type Generator | |
|---|---|
Pair<K,Generator<T>> |
GroupByGenerator.next()
|
| Constructors in net.ericaro.neoitertools.generators with parameters of type Generator | |
|---|---|
ChainGenerator(Generator<Generator<T>> iterators)
chain together a sequence of sequences. |
|
CycleGenerator(Generator<T> generator)
|
|
DropWhileGenerator(Lambda<T,java.lang.Boolean> predicate,
Generator<T> source)
|
|
EnumerateGenerator(Generator<T> source)
|
|
EnumerateGenerator(Generator<T> source,
int startIndex)
|
|
FilterGenerator(Lambda<T,java.lang.Boolean> predicate,
Generator<T> source)
|
|
FilterGenerator(Lambda<T,java.lang.Boolean> predicate,
Generator<T> source,
boolean negate)
|
|
GeneratorIterator(Generator<T> source)
|
|
GroupByGenerator(Generator<T> generator,
Lambda<T,K> keyMapper)
|
|
MapGenerator(Lambda<? super T,K> map,
Generator<T> source)
|
|
SliceGenerator(Generator<T> sequence,
int start,
int stop,
int step)
|
|
TakeWhileGenerator(Lambda<? super T,java.lang.Boolean> predicate,
Generator<T> iterator)
Make an iterator that returns elements from the iterator as long as the predicate is true. |
|
TeeGeneratorFactory(Generator<T> source)
|
|
ZipPairGenerator(Generator<T1> iterator1,
Generator<T2> iterator2)
|
|
ZipPairGenerator(Generator<T1> iterator1,
Generator<T2> iterator2)
|
|
| Constructor parameters in net.ericaro.neoitertools.generators with type arguments of type Generator | |
|---|---|
ChainGenerator(Generator<Generator<T>> iterators)
chain together a sequence of sequences. |
|
ZipGenerator(java.util.List<Generator<T>> generators)
|
|
| Uses of Generator in net.ericaro.neoitertools.generators.combinatorics |
|---|
| Classes in net.ericaro.neoitertools.generators.combinatorics that implement Generator | |
|---|---|
class |
BigNumber
A BigNumber is simply a number represented by a fixed collections of digits of size size. |
class |
CombinationNumber
A big number that follows combinations. |
class |
FactorialNumber
A Factorial number is a big number where the ith digit must be in [0, i]. |
class |
FixedSumNumber
A Combinatorial Number is a BigNumber where the sum of all digits must be <= total -size. |
class |
PermutationNumber
A big number whose values are all the permutations. |
class |
SubListNumber
a big number that return all the permutation of all the subsets, therefore the name: sublist |
class |
VarBaseNumber
|
| Methods in net.ericaro.neoitertools.generators.combinatorics that return Generator | ||
|---|---|---|
static
|
Combinatorics.applied(java.util.List<T> elements,
Generator<int[]> indicesGenerator)
Return a Generator over a list of applied transformation ( @see Combinatorics.apply(List, int[]) . |
|
static Generator<int[]> |
Combinatorics.combinations(int m,
int n)
Calculate all subsets' indices |
|
static Generator<int[]> |
Combinatorics.permutations(int n)
Calculate all permutations' indices |
|
static Generator<int[]> |
Combinatorics.product(int[] lengths)
Calculate all product selectors' indices |
|
static
|
Combinatorics.selected(java.util.List<java.util.List<T>> lists,
Generator<int[]> indicesGenerator)
Return an Generator over a list of selection ( @see Combinatorics.select(List, int[]) . |
|
static Generator<int[]> |
Combinatorics.sublists(int m,
int n)
Calculate sublists' indexes |
|
| Methods in net.ericaro.neoitertools.generators.combinatorics with parameters of type Generator | ||
|---|---|---|
static
|
Combinatorics.applied(java.util.List<T> elements,
Generator<int[]> indicesGenerator)
Return a Generator over a list of applied transformation ( @see Combinatorics.apply(List, int[]) . |
|
static
|
Combinatorics.selected(java.util.List<java.util.List<T>> lists,
Generator<int[]> indicesGenerator)
Return an Generator over a list of selection ( @see Combinatorics.select(List, int[]) . |
|
| Uses of Generator in net.ericaro.neoitertools.generators.primitives |
|---|
| Classes in net.ericaro.neoitertools.generators.primitives that implement Generator | |
|---|---|
class |
BooleanGenerator
A simple Generator over a boolean array |
class |
ByteGenerator
A simple Generator over a byte array |
class |
CharacterGenerator
A simple Generator over a char array |
class |
DoubleGenerator
A simple Generator over a double array |
class |
FloatGenerator
A simple Generator over a float array |
class |
IntegerGenerator
A simple Generator over a int array |
class |
LongGenerator
A simple Generator over a long array |
class |
ShortGenerator
A simple Generator over a short array |
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||