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