Interface Access1D<N extends java.lang.Comparable<N>>

    • Method Detail

      • equals

        static boolean equals​(Access1D<?> accessA,
                              Access1D<?> accessB,
                              NumberContext accuracy)
        Tests if the two data structures are numerically equal to the given accuracy. (Only works with real numbers, and can't handle more than "double precision".) You have to implement your own version to handle other cases.
      • toString

        static java.lang.String toString​(Access1D<?> access)
      • wrap

        static <N extends java.lang.Comparable<N>> Access1D<N> wrap​(java.util.List<? extends N> target)
      • wrap

        static <N extends java.lang.Comparable<N>> Access1D<N> wrap​(N[] target)
      • axpy

        default void axpy​(double a,
                          Mutate1D.Modifiable<?> y)
        Will calculate y = y + a x, will add "a" times "this" to "y"
        Parameters:
        a - The scale
        y - The "vector" to update
      • byteValue

        default byte byteValue​(int index)
      • byteValue

        default byte byteValue​(long index)
      • dot

        default double dot​(Access1D<?> vector)
        Will calculate and return the dot product of this 1D-structure and another input 1D-vector.
        Parameters:
        vector - Another 1D-structure
        Returns:
        The dot product
      • doubleValue

        double doubleValue​(int index)
      • doubleValue

        default double doubleValue​(long index)
      • elements

        default ElementView1D<N,​?> elements()
        Returns an Iterable of ElementView1D. It allows to iterate over the instance's element "positions" without actually extracting the elements (unless you explicitly do so).
      • floatValue

        default float floatValue​(int index)
      • floatValue

        default float floatValue​(long index)
      • get

        N get​(long index)
      • intValue

        default int intValue​(int index)
      • intValue

        default int intValue​(long index)
      • longValue

        default long longValue​(int index)
      • longValue

        default long longValue​(long index)
      • nonzeros

        default ElementView1D<N,​?> nonzeros()
        Similar to elements() but avoids elements that are structurally known to be zero. (That does not eliminate all zero-values from this view.) With an arbitrary (dense) unstructured implementation the nonzeros() and elements() methods do the same thing! Only some specific implementations are able to actually exploit structure/sparsity to view fewer elements.
      • select

        default Access1D<N> select​(long... selection)
        Creates a view of the underlying data structure of only the selected elements.
      • shortValue

        default short shortValue​(int index)
      • shortValue

        default short shortValue​(long index)
      • supplyTo

        default void supplyTo​(double[] receiver)
      • toRawCopy1D

        default double[] toRawCopy1D()