Class AbstractObjectMatrix<T>

  • Type Parameters:
    T - Type of the values
    All Implemented Interfaces:
    OctaveObject
    Direct Known Subclasses:
    OctaveCell

    public abstract class AbstractObjectMatrix<T>
    extends AbstractGenericMatrix<T[],​it.unimi.dsi.fastutil.objects.ObjectArrayList<T>>
    General matrix with Object values which serves also as base class for OctaveCell.
    • Constructor Detail

      • AbstractObjectMatrix

        protected AbstractObjectMatrix​(int... size)
        Parameters:
        size -
      • AbstractObjectMatrix

        protected AbstractObjectMatrix​(Object[] dataA,
                                       int... size)
        Parameters:
        dataA -
        size -
      • AbstractObjectMatrix

        protected AbstractObjectMatrix​(AbstractGenericMatrix<T[],​it.unimi.dsi.fastutil.objects.ObjectArrayList<T>> o)
        Copy constructor.
        Parameters:
        o -
    • Method Detail

      • newL

        protected final it.unimi.dsi.fastutil.objects.ObjectArrayList<T> 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<T[],​it.unimi.dsi.fastutil.objects.ObjectArrayList<T>>
        Returns:
        new D[size]
      • initL

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

        protected T[] 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<T[],​it.unimi.dsi.fastutil.objects.ObjectArrayList<T>>
      • set

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

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

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