Class 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 Detail

      • OpenMapEntry

        protected OpenMapEntry​(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 class RealVector.Entry
        Returns:
        the value of the entry.
      • setValue

        public void setValue​(double value)
        Set the value of the entry.
        Overrides:
        setValue in class RealVector.Entry
        Parameters:
        value - New value for the entry.
      • getIndex

        public int getIndex()
        Get the index of the entry.
        Overrides:
        getIndex in class RealVector.Entry
        Returns:
        the index of the entry.