Documentation of 'org.nd4j.linalg.indexing.NDArrayIndex' Java class
NDArrayIndex
org.nd4j.linalg.indexing

Class NDArrayIndex



  • public class NDArrayIndex
    extends java.lang.Object
    NDArray indexing
    • Constructor Detail

      • NDArrayIndex

        public NDArrayIndex(int... indices)
    • Method Detail

      • end

        public int end()
      • offset

        public int offset()
      • length

        public int length()
        Returns the length of the indices
        Returns:
        the length of the range
      • indices

        public int[] indices()
      • reverse

        public void reverse()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • create

        public static NDArrayIndex[] create(INDArray index)
        Create from a matrix. The rows are the indices The columns are the individual element in each ndarrayindex
        Parameters:
        index - the matrix to getFloat indices from
        Returns:
        the indices to getFloat
      • isInterval

        public boolean isInterval()
      • setInterval

        public void setInterval(boolean isInterval)
      • concat

        public static NDArrayIndex concat(NDArrayIndex... indexes)
        Concatneate all of the given indices in to one
        Parameters:
        indexes - the indexes to concatneate
        Returns:
        the merged indices
      • interval

        public static NDArrayIndex interval(int begin,
                                            int end)
        Generates an interval from begin (inclusive) to end (exclusive)
        Parameters:
        begin - the begin
        end - the end index
        Returns:
        the interval
      • interval

        public static NDArrayIndex interval(int begin,
                                            int end,
                                            boolean inclusive)
        Generates an interval from begin (inclusive) to end (exclusive)
        Parameters:
        begin - the begin
        end - the end index
        inclusive - whether the end should be inclusive or not
        Returns:
        the interval

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.