public class NewAxis extends Object implements INDArrayIndex
Constructor and Description |
---|
NewAxis() |
Modifier and Type | Method and Description |
---|---|
int |
current()
Return the current index
without incrementing the counter
|
int |
end()
The ending for this index
|
boolean |
hasNext()
Returns true if there is another element
in the index to iterate over
otherwise false
|
void |
init(INDArray arr,
int dimension)
Init the index wrt
the dimension and the given nd array
|
void |
init(INDArray arr,
int begin,
int dimension)
Init the index wrt
the dimension and the given nd array
|
void |
init(int begin,
int end)
Initiailize based on the specified begin and end
|
boolean |
isInterval()
Returns true
if the index is an interval
|
int |
length()
The total length of this index (end - start)
|
int |
next()
Returns the next index
|
int |
offset()
The start of this index
|
void |
reset() |
void |
reverse()
Reverse the indexes
|
void |
setInterval(boolean isInterval) |
int |
stride()
The stride for the index (most of the time will be 1)
|
public int end()
INDArrayIndex
end
in interface INDArrayIndex
public int offset()
INDArrayIndex
offset
in interface INDArrayIndex
public int length()
INDArrayIndex
length
in interface INDArrayIndex
public int stride()
INDArrayIndex
stride
in interface INDArrayIndex
public int current()
INDArrayIndex
current
in interface INDArrayIndex
public boolean hasNext()
INDArrayIndex
hasNext
in interface INDArrayIndex
public int next()
INDArrayIndex
next
in interface INDArrayIndex
public void reverse()
INDArrayIndex
reverse
in interface INDArrayIndex
public boolean isInterval()
INDArrayIndex
isInterval
in interface INDArrayIndex
public void setInterval(boolean isInterval)
setInterval
in interface INDArrayIndex
public void init(INDArray arr, int begin, int dimension)
INDArrayIndex
init
in interface INDArrayIndex
arr
- the array to initialize onbegin
- the beginning indexdimension
- the dimension to initialize onpublic void init(INDArray arr, int dimension)
INDArrayIndex
init
in interface INDArrayIndex
arr
- the array to initialize ondimension
- the dimension to initialize onpublic void init(int begin, int end)
INDArrayIndex
init
in interface INDArrayIndex
public void reset()
reset
in interface INDArrayIndex
Copyright © 2016. All Rights Reserved.