public final class MonomialSet<Term extends AMonomial<Term>> extends TreeMap<DegreeVector,Term> implements Iterable<Term>, Cloneable
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
MonomialSet(Comparator<? super DegreeVector> comparator) |
MonomialSet(SortedMap<DegreeVector,? extends Term> m)
Constructs a new monomial set containing the same mappings and using the same ordering as the specified sorted
map.
|
Modifier and Type | Method and Description |
---|---|
Term |
add(Term term)
Add monomial to this set
|
Iterator<Term> |
ascendingIterator() |
MonomialSet<Term> |
clone() |
Collection<Term> |
collection()
Collection view of all terms
|
int[] |
degrees()
Returns an array of degrees of all variables, so that is i-th element of the result is the polynomial degree
(univariate) with respect to i-th variable
|
default int |
degreeSum()
Returns the sum of
degrees() |
Iterator<Term> |
descendingIterator() |
Term |
first()
First monomial in this set
|
Iterator<Term> |
iterator() |
Term |
last()
Last monomial in this set
|
default Term |
lt() |
int |
size() |
ceilingEntry, ceilingKey, clear, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values
equals, hashCode, isEmpty, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove
public MonomialSet(Comparator<? super DegreeVector> comparator)
public MonomialSet(SortedMap<DegreeVector,? extends Term> m)
m
- the sorted map whose mappings are to be placed in this monomial set, and whose comparator is to be used
to sort this mappublic Term first()
public Term last()
public Collection<Term> collection()
public int[] degrees()
public MonomialSet<Term> clone()
public Term lt()
public int size()
Copyright © 2018. All rights reserved.