Class OctaveBoolean

  • All Implemented Interfaces:
    OctaveObject

    public final class OctaveBoolean
    extends AbstractGenericMatrix<boolean[],​it.unimi.dsi.fastutil.booleans.BooleanArrayList>
    Represents a Boolean matrix. Not so appropriate for sparse matrices.
    See Also:
    OctaveSparseBoolean
    • Constructor Detail

      • OctaveBoolean

        public OctaveBoolean​(int... size)
        Parameters:
        size -
      • OctaveBoolean

        public OctaveBoolean​(boolean[] data,
                             int... size)
        Parameters:
        data -
        size -
    • Method Detail

      • newL

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

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

        protected boolean[] 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<boolean[],​it.unimi.dsi.fastutil.booleans.BooleanArrayList>
      • set

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

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

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