Class DenseFileMatrix

    • Constructor Detail

      • DenseFileMatrix

        public DenseFileMatrix​(java.io.File file,
                               long... size)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • DenseFileMatrix

        public DenseFileMatrix​(java.io.File file)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • DenseFileMatrix

        public DenseFileMatrix​(java.io.File file,
                               int dataType,
                               long... size)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • DenseFileMatrix

        public DenseFileMatrix​(java.io.File file,
                               long offset,
                               int dataType,
                               boolean readOnly,
                               long... size)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • DenseFileMatrix

        public DenseFileMatrix​(int bufferSize,
                               java.io.File file,
                               long offset,
                               int dataType,
                               boolean readOnly,
                               long... size)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • DenseFileMatrix

        public DenseFileMatrix​(long... size)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • DenseFileMatrix

        public DenseFileMatrix​(Matrix m)
                        throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getBufferSize

        public int getBufferSize()
      • setBufferSize

        public void setBufferSize​(int bufferSize)
      • createFile

        private void createFile()
      • getFile

        public java.io.File getFile()
      • getBitsPerValue

        private static final int getBitsPerValue​(int dataType)
      • getBytesPerValue

        public long getBytesPerValue()
      • getBitsPerValue

        public int getBitsPerValue()
      • getPos

        private long getPos​(long... pos)
      • getFileLength

        public long getFileLength()
      • getDataType

        public int getDataType()
      • getDouble

        public double getDouble​(long... c)
        Description copied from interface: DoubleMatrixMultiD
        Returns a double representation of an entry in the matrix. The stored value will be converted to a double as good as possible.
        Specified by:
        getDouble in interface DoubleMatrixMultiD
        Parameters:
        c - location of the entry
        Returns:
        a double representation of the entry @
      • setSize

        public void setSize​(long... size)
        Description copied from interface: BaseMatrixProperties
        Sets the size of the matrix. This is an optional method that is not implemented for all matrices. If this method is not implemented, a MatrixException is thrown.
        Specified by:
        setSize in interface BaseMatrixProperties
        Overrides:
        setSize in class AbstractMatrix
        Parameters:
        size - the new size of the matrix
      • getBit

        private static final double getBit​(byte b,
                                           double offset)
      • setBit

        private static final byte setBit​(byte b,
                                         double offset)
      • setDouble

        public void setDouble​(double value,
                              long... c)
        Description copied from interface: DoubleMatrixMultiD
        Sets an entry in the matrix to a double value. If the matrix cannot store double values, the value will be represented as good as possible.
        Specified by:
        setDouble in interface DoubleMatrixMultiD
        Parameters:
        value - double value
        c - location of the entry @
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • getShortLittleEndian

        public static final int getShortLittleEndian​(byte[] bytes)
      • getIntLittleEndian

        public static final int getIntLittleEndian​(byte[] bytes)
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream s)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • readObject

        private void readObject​(java.io.ObjectInputStream s)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • erase

        public void erase()
                   throws java.io.IOException
        Specified by:
        erase in interface Erasable
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException