T
- The type of this LinearCombination.E
- The type of elements contained in this LinearCombination.public interface LinearCombination<T extends LinearCombination,E extends GeomElement> extends GeometryList<T,E>
B = W1*Obj_1 + ... + Wn*Obj_n
where W1 through Wn
are scalar weights. The linear addition is done independently of physical dimension
(each dimension is added separately) and the weighted addition is done in parameter
space in appropriate: B = W1*Srf_1(s,t) + ... + Wn*Srf_n(s,t)
.
Modified by: Joseph A. Huwaldt
Modifier and Type | Method and Description |
---|---|
boolean |
add(E value,
java.lang.Double weight)
Appends the specified GeomElement to the end of this list.
|
void |
add(int index,
E value,
java.lang.Double weight)
Inserts the specified GeomElement at the specified position in this list.
|
boolean |
addAll(java.util.Collection<? extends E> elements,
java.util.Collection<java.lang.Double> weights)
Appends all of the GeomElement objects in the specified collection to this list.
|
boolean |
addAll(int index,
java.util.Collection<? extends E> elements,
java.util.Collection<java.lang.Double> weights)
Inserts all of the GeomElement objects in the specified collection and their
associated weights into this linear combination at the specified position.
|
java.lang.Double |
getFirstWeight()
Returns the first linear combination weight from this list.
|
java.lang.Double |
getLastWeight()
Returns the last linear combination weight from this list.
|
java.lang.Double |
getWeight(int index)
Returns the linear combination weight at the specified position in this list.
|
java.util.List<java.lang.Double> |
getWeightRange(int first,
int last)
Returns the range of linear combination weights in this list from the specified
start and ending indexes as a List of double values.
|
E |
set(int index,
E curve,
java.lang.Double weight)
Replaces the GeomElement and weight at the specified position in this linear
combination with the specified GeomElement and weight.
|
java.lang.Double |
setWeight(int index,
java.lang.Double weight)
Replaces the weight at the specified position in this linear combination list with
the specified weight.
|
java.util.List<java.lang.Double> |
unmodifiableWeightList()
Returns an unmodifiable list view of the list of weights in this linear
combination.
|
add, add, addAll, addAll, containsGeometry, get, getAll, getFirst, getIndexFromName, getLast, getRange, remove, reverse, to, toDimension, unmodifiableList
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
getTransformed
addChangeListener, copy, copyToReal, getAllUserData, getBoundsMax, getBoundsMin, getID, getLimitPoint, getName, getParDimension, getPhyDimension, getUnit, getUserData, isValid, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, size, toText
java.util.List<java.lang.Double> unmodifiableWeightList()
java.lang.Double getWeight(int index)
index
- index of weight to return (0 returns the 1st element, -1 returns the
last, -2 returns the 2nd from last, etc).java.lang.IndexOutOfBoundsException
- if the given index is out of range:
index > size()
java.lang.Double getFirstWeight()
java.lang.Double getLastWeight()
java.util.List<java.lang.Double> getWeightRange(int first, int last)
first
- index of the first element to return (0 returns the 1st element, -1
returns the last, etc).last
- index of the last element to return (0 returns the 1st element, -1
returns the last, etc).java.lang.IndexOutOfBoundsException
- if the given index is out of range:
index ≥ size()
void add(int index, E value, java.lang.Double weight)
Note: If this method is used concurrent access must be synchronized (the table is not thread-safe).
index
- the index at which the specified element is to be inserted. (0
returns the 1st element, -1 returns the last, -2 returns the 2nd from
last, etc).value
- the element to be inserted. May not be null.weight
- the linear combination weight of the element to be inserted. May not
be null.java.lang.IndexOutOfBoundsException
- if index > size()
boolean add(E value, java.lang.Double weight)
Note: If this method is used concurrent access must be synchronized (the table is not thread-safe).
value
- the element to be appended to this list. May not be null.weight
- the linear combination weight of the element to be appended. May not
be null.DimensionException
- if the input element's dimensions are different from
this list's dimensions.boolean addAll(java.util.Collection<? extends E> elements, java.util.Collection<java.lang.Double> weights)
elements
- the elements to be appended onto this list. May not be null.weights
- the linear combination weights associated with all of the elements
being appended. May not be null.true
if this LinearComboCurve changed as a result of the callboolean addAll(int index, java.util.Collection<? extends E> elements, java.util.Collection<java.lang.Double> weights)
index
- index at which to insert first element from the specified
collection.elements
- the elements to be inserted into this linear combination. May not
be null.weights
- the linear combination weights associated with each element being
inserted. May not be null.true
if this LinearComboCurve changed as a result of the calljava.lang.Double setWeight(int index, java.lang.Double weight)
index
- The index of the weight to replace (0 returns the 1st element, -1
returns the last, -2 returns the 2nd from last, etc).weight
- The weight to be stored at the specified position. The GeomElement at
that position is left unchanged. May not be null.java.lang.IndexOutOfBoundsException
- - if index > size()
E set(int index, E curve, java.lang.Double weight)
index
- The index of the element and weight to replace (0 returns the 1st
element, -1 returns the last, -2 returns the 2nd from last, etc).curve
- The GeomElement to be stored at the specified position.
null
elements are ignored.weight
- The weight to be stored at the specified position. May not be null.java.lang.IndexOutOfBoundsException
- - if index > size()