org.nd4j.linalg.indexing
Class NDArrayIndex
- java.lang.Object
-
- org.nd4j.linalg.indexing.NDArrayIndex
-
public class NDArrayIndex extends java.lang.ObjectNDArray indexing
-
-
Constructor Summary
Constructors Constructor and Description NDArrayIndex(int... indices)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static NDArrayIndexconcat(NDArrayIndex... indexes)Concatneate all of the given indices in to onestatic NDArrayIndex[]create(INDArray index)Create from a matrix.intend()booleanequals(java.lang.Object o)inthashCode()int[]indices()static NDArrayIndexinterval(int begin, int end)Generates an interval from begin (inclusive) to end (exclusive)static NDArrayIndexinterval(int begin, int end, boolean inclusive)Generates an interval from begin (inclusive) to end (exclusive)booleanisInterval()intlength()Returns the length of the indicesintoffset()voidreverse()voidsetInterval(boolean isInterval)java.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.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 beginend- 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 beginend- the end indexinclusive- whether the end should be inclusive or not- Returns:
- the interval
-
-
DMelt 3.0 © DataMelt by jWork.ORG