Class ServerObjectMatrixUDP

    • Constructor Detail

      • ServerObjectMatrixUDP

        public ServerObjectMatrixUDP​(Matrix matrix,
                                     int port)
    • Method Detail

      • clear

        public final void clear()
      • getAsDouble

        public double getAsDouble​(long... coordinates)
        Description copied from interface: GettersAndSetters
        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:
        getAsDouble in interface GettersAndSetters
        Overrides:
        getAsDouble in class AbstractObjectMatrix
        Parameters:
        coordinates - location of the entry
        Returns:
        a double representation of the entry @
      • getObject

        public java.lang.Object getObject​(long... coordinates)
      • setAsDouble

        public void setAsDouble​(double value,
                                long... coordinates)
        Description copied from interface: GettersAndSetters
        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:
        setAsDouble in interface GettersAndSetters
        Overrides:
        setAsDouble in class AbstractObjectMatrix
        Parameters:
        value - double value
        coordinates - location of the entry @
      • 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.
      • 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