Class OctaveDouble

  • All Implemented Interfaces:
    OctaveObject

    public final class OctaveDouble
    extends AbstractGenericMatrix<double[],​it.unimi.dsi.fastutil.doubles.DoubleArrayList>
    Represents a matrix of doubles.
    • Constructor Detail

      • OctaveDouble

        public OctaveDouble​(int... size)
        Create new matrix.
        Parameters:
        size -
      • OctaveDouble

        public OctaveDouble​(double[] data,
                            int... size)
        Constructor that reuses the input data.
        Parameters:
        data -
        size -
      • OctaveDouble

        protected OctaveDouble​(OctaveDouble o)
        Copy constructor.
        Parameters:
        o -
    • Method Detail

      • newL

        protected final it.unimi.dsi.fastutil.doubles.DoubleArrayList newL​(int size)
        Description copied from class: AbstractGenericMatrix
        Returns a new data store with given size and entries carrying the default value. The latter depends on the types: false for boolean, 0 for int, 0.0 for double and null for GenericMatrix's.
        Specified by:
        newL in class AbstractGenericMatrix<double[],​it.unimi.dsi.fastutil.doubles.DoubleArrayList>
        Returns:
        new D[size]
      • initL

        protected final int initL​(double[] data,
                                  int size)
        Specified by:
        initL in class AbstractGenericMatrix<double[],​it.unimi.dsi.fastutil.doubles.DoubleArrayList>
      • getDataA

        protected double[] getDataA()
        Description copied from class: AbstractGenericMatrix
        Returns the data store as an array. There are subclasses with array of primitive types.
        Specified by:
        getDataA in class AbstractGenericMatrix<double[],​it.unimi.dsi.fastutil.doubles.DoubleArrayList>
      • set

        public final void set​(double value,
                              int... pos)
        Set the value resizing by need.
        Parameters:
        value -
        pos -
        See Also:
        setPlain(double, int)
      • setPlain

        public final void setPlain​(double value,
                                   int pos)
        Set the value assuming resize is not necessary.
        Parameters:
        value -
        pos -
        See Also:
        set(double, int[])
      • get

        public final double get​(int... pos)
        Get the value.
        Parameters:
        pos -
        Returns:
        value at pos