Class SparseCSVMatrix

    • Field Detail

      • fieldDelimiter

        private java.lang.String fieldDelimiter
      • data

        private final java.util.Map<java.lang.Long,​java.lang.Object[]> data
      • rowToLine

        private final java.util.Map<java.lang.Long,​java.util.List<java.lang.Long>> rowToLine
    • Constructor Detail

      • SparseCSVMatrix

        public SparseCSVMatrix​(java.lang.String file,
                               java.lang.Object... parameters)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • SparseCSVMatrix

        public SparseCSVMatrix​(java.io.File file,
                               java.lang.Object... parameters)
                        throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • clear

        public final void clear()
      • getString

        public java.lang.String getString​(long row,
                                          long column)
      • 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.
        Returns:
        Iterable over the saved entries in a Matrix.
      • setString

        public void setString​(java.lang.String value,
                              long row,
                              long column)
      • 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.
        Parameters:
        coordinates - The coordinates to check
        Returns:
        a boolean stating if the coordinates are part of the Matrix