Class BufferedObjectMatrix

    • Field Detail

      • lazy

        private boolean lazy
      • inputBuffer

        private Matrix inputBuffer
      • outputToDoBuffer

        private java.util.SortedSet<Coordinates> outputToDoBuffer
      • inputToDoBuffer

        private java.util.SortedSet<Coordinates> inputToDoBuffer
      • outputBufferSize

        private int outputBufferSize
      • original

        private Matrix original
      • writeThread

        private java.lang.Thread writeThread
      • readThread

        private java.lang.Thread readThread
      • EMPTYOBJECT

        private static final EmptyObject EMPTYOBJECT
    • Constructor Detail

      • BufferedObjectMatrix

        public BufferedObjectMatrix​(Matrix original)
      • BufferedObjectMatrix

        public BufferedObjectMatrix​(Matrix original,
                                    int outputBufferSize)
      • BufferedObjectMatrix

        public BufferedObjectMatrix​(Matrix original,
                                    int outputBufferSize,
                                    int inputBufferSize)
    • Method Detail

      • clear

        public final void clear()
        Specified by:
        clear in interface Clearable
      • availableCoordinates

        public java.lang.Iterable<long[]> availableCoordinates()
        Description copied from interface: CoordinateFunctions
        Returns an Iterator that only goes over the coordinates in the Matrix that are stored. For most Matrices, this is the same as allCoordinates(). For sparse Matrices, it iterates only over the entries in it.
        Specified by:
        availableCoordinates in interface CoordinateFunctions
        Returns:
        Iterable over the saved entries in a Matrix.
      • getObject

        public java.lang.Object getObject​(long... coordinates)
        Specified by:
        getObject in interface GenericMatrixMultiD<java.lang.Object>
      • setInputBufferSize

        public void setInputBufferSize​(int numElements)
      • setOutputBufferSize

        public void setOutputBufferSize​(int numElements)
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Throws:
        java.io.IOException
      • getOutputBufferSize

        public int getOutputBufferSize()
      • containsCoordinates

        public boolean containsCoordinates​(long... coordinates)
        Description copied from interface: CoordinateFunctions
        Determines if the given Coordinates are part of the Matrix. If the Matrix is dense, true is returned for all Coordinates smaller than the Matrix's size. For sparse Matrices, this function checks if the coordinates are actually stored in the matrix or not.
        Specified by:
        containsCoordinates in interface CoordinateFunctions
        Parameters:
        coordinates - The coordinates to check
        Returns:
        a boolean stating if the coordinates are part of the Matrix