Class OpenMapRealVector.OpenMapEntry
- java.lang.Object
-
- org.apache.commons.math4.legacy.linear.RealVector.Entry
-
- org.apache.commons.math4.legacy.linear.OpenMapRealVector.OpenMapEntry
-
- Enclosing class:
- OpenMapRealVector
protected class OpenMapRealVector.OpenMapEntry extends RealVector.Entry
Implementation ofEntry
optimized for OpenMap. This implementation does not allow arbitrary calls tosetIndex
since the order in which entries are returned is undefined.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
OpenMapEntry(org.apache.commons.math4.legacy.linear.OpenIntToDoubleHashMap.Iterator iter)
Build an entry from an iterator point to an element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIndex()
Get the index of the entry.double
getValue()
Get the value of the entry.void
setValue(double value)
Set the value of the entry.-
Methods inherited from class org.apache.commons.math4.legacy.linear.RealVector.Entry
setIndex
-
-
-
-
Constructor Detail
-
OpenMapEntry
protected OpenMapEntry(org.apache.commons.math4.legacy.linear.OpenIntToDoubleHashMap.Iterator iter)
Build an entry from an iterator point to an element.- Parameters:
iter
- Iterator pointing to the entry.
-
-
Method Detail
-
getValue
public double getValue()
Get the value of the entry.- Overrides:
getValue
in classRealVector.Entry
- Returns:
- the value of the entry.
-
setValue
public void setValue(double value)
Set the value of the entry.- Overrides:
setValue
in classRealVector.Entry
- Parameters:
value
- New value for the entry.
-
getIndex
public int getIndex()
Get the index of the entry.- Overrides:
getIndex
in classRealVector.Entry
- Returns:
- the index of the entry.
-
-