Interface Tensoric<V>

    • Method Detail

      • get

        V get​(Position position)
        Parameters:
        position - the position in the N-dimensional space where to find the value.
        Returns:
        the value at the given position
        Throws:
        java.lang.IllegalArgumentException - when number of coordinates is not sufficient
        java.util.NoSuchElementException - if the tensor contains no element for the given position
      • get

        default V get​(java.lang.Object... coordinates)
        Parameters:
        coordinates - form N-dimensional space where to find the value.
        Returns:
        a value at the given coordinates.
        Throws:
        java.lang.IllegalArgumentException - if the number of coordinates in incorrect
        java.util.NoSuchElementException - if the tensor contains no element for the position constructed from the given coordinates.
      • contains

        boolean contains​(Position position)
        Returns true if the tensoric object contains the given position, false otherwise.
        Parameters:
        position - the position to be checked
        Returns:
        true if the position is contained in the tensoric object, false otherwise.
      • contains

        default boolean contains​(java.lang.Object... coordinates)
        Convenience method for contains(Position), with the position constructed from the given coordinates.
        Parameters:
        coordinates - the coordinates which represent the position to be checked
        Returns:
        true if the position represented by the given coordinates is contained in the tensoric object, false otherwise.