Class PolySpliterator<C extends RingElem<C>>
java.lang.Object
edu.jas.poly.PolySpliterator<C>
- All Implemented Interfaces:
Spliterator<Monomial<C>>
public class PolySpliterator<C extends RingElem<C>>
extends Object
implements Spliterator<Monomial<C>>
Spliterator over monomials of a polynomial.
Adaptor for val.entrySet().spliterator().
-
Nested Class Summary
Nested classes/interfaces inherited from interface Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS, T_SPLITR> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Spliterator<Map.Entry<ExpVector, C>> Internal spliterator over polynomial map.Polynomial sorted map.Fields inherited from interface Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructor of polynomial spliterator.protectedPolySpliterator(Spliterator<Map.Entry<ExpVector, C>> mse, SortedMap<ExpVector, C> m) Constructor of polynomial spliterator. -
Method Summary
Modifier and TypeMethodDescriptionintReturns a set of characteristics of this Spliterator and its elements.longReturns an estimate of the number of elements of this Spliterator.Get the monomial comparator.toString()String representation of PolySpliterator.booleantryAdvance(Consumer<? super Monomial<C>> action) If a remaining element exists perform the action on it.trySplit()Try to split this spliterator.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Spliterator
forEachRemaining, getExactSizeIfKnown, hasCharacteristics
-
Field Details
-
ms
-
sm
-
-
Constructor Details
-
PolySpliterator
-
PolySpliterator
-
-
Method Details
-
toString
-
characteristics
public int characteristics()Returns a set of characteristics of this Spliterator and its elements.- Specified by:
characteristicsin interfaceSpliterator<C extends RingElem<C>>- Returns:
- ORed value of the characteristics.
-
estimateSize
public long estimateSize()Returns an estimate of the number of elements of this Spliterator.- Specified by:
estimateSizein interfaceSpliterator<C extends RingElem<C>>- Returns:
- size of the sorted map.
-
getComparator
Get the monomial comparator.- Specified by:
getComparatorin interfaceSpliterator<C extends RingElem<C>>- Returns:
- monomial comparator.
-
trySplit
Try to split this spliterator.- Specified by:
trySplitin interfaceSpliterator<C extends RingElem<C>>- Returns:
- polynomial spliterator or null.
-
tryAdvance
If a remaining element exists perform the action on it.- Specified by:
tryAdvancein interfaceSpliterator<C extends RingElem<C>>- Returns:
- true if the polynomial spliterator could be advanced, else false.
-