Class DenseFileMatrix

All Implemented Interfaces:
Closeable, Serializable, AutoCloseable, Cloneable, Comparable<Matrix>, HasMetaData, BaseMatrix, BooleanCalculations, CanPerformCalculations, DenseMatrix, DenseMatrix2D, DenseMatrixMultiD, BaseDoubleMatrix, BasicDoubleCalculations, DoubleCalculations, BasicEntrywiseDoubleCalculations, CreatorDoubleCalculations, EntrywiseDoubleCalculations, HyperbolicDoubleCalculations, MiscEntrywiseDoubleCalculations, RoundingDoubleCalculations, TrigonometricDoubleCalculations, DecompositionDoubleCalculations, DiscretizeCalculations, GeneralDoubleCalculations, MiscGeneralDoubleCalculations, MissingValueDoubleCalculations, StatisticalDoubleCalculations, DenseDoubleMatrix, DenseDoubleMatrix2D, DenseDoubleMatrixMultiD, DoubleMatrix, DoubleMatrix2D, DoubleMatrixMultiD, SparseDoubleMatrix, SparseDoubleMatrix2D, SparseDoubleMatrixMultiD, BaseGenericMatrix<Double>, DenseGenericMatrix<Double>, DenseGenericMatrix2D<Double>, DenseGenericMatrixMultiD<Double>, GenericMatrix<Double>, GenericMatrix2D<Double>, GenericMatrixMultiD<Double>, SparseGenericMatrix<Double>, SparseGenericMatrix2D<Double>, SparseGenericMatrixMultiD<Double>, BaseMatrixProperties, Clearable, Conversions, CoordinateFunctions, CoreObject, DistanceMeasures, Erasable, ExtendedMatrixProperties, GettersAndSetters, HasDescription, HasGUIObject, HasId, HasLabel, IntCalculations, Matrix, Matrix2D, MatrixMultiD, BaseNumberMatrix<Double>, DenseNumberMatrix<Double>, DenseNumberMatrix2D<Double>, DenseNumberMatrixMultiD<Double>, NumberMatrix<Double>, NumberMatrix2D<Double>, NumberMatrixMultiD<Double>, SparseNumberMatrix<Double>, SparseNumberMatrix2D<Double>, SparseNumberMatrixMultiD<Double>, ObjectCalculations, SparseMatrix, SparseMatrix2D, SparseMatrixMultiD, StringCalculations
Direct Known Subclasses:
WaveMatrix

public class DenseFileMatrix extends AbstractDenseDoubleMatrixMultiD implements Erasable, Closeable
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getBufferSize

      public int getBufferSize()
    • setBufferSize

      public void setBufferSize(int bufferSize)
    • createFile

      private void createFile()
    • getRandomAccessFile

      public BufferedRandomAccessFile getRandomAccessFile()
    • getFile

      public 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 Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • isReadOnly

      public boolean isReadOnly()
      Specified by:
      isReadOnly in interface BaseMatrixProperties
      Overrides:
      isReadOnly in class AbstractMatrix
    • getShortLittleEndian

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

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

      private void writeObject(ObjectOutputStream s) throws IOException
      Throws:
      IOException
    • readObject

      private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
      Throws:
      IOException
      ClassNotFoundException
    • erase

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

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException