Package org.nd4j.autodiff.samediff
Class SDIndex
- java.lang.Object
-
- org.nd4j.autodiff.samediff.SDIndex
-
public class SDIndex extends Object
SDIndex is theSameDiffequivalent toINDArrayIndexit usesStridedSliceunderneath to obtain varying elements. It also supportsSDVariableinputs allowing for graph definitions of indexing operations.- Author:
- Alex Black, Adam Gibson
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSDIndex.IndexTypeIndex types include the following: 1.
-
Constructor Summary
Constructors Constructor Description SDIndex()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SDIndexall()Represents all the elements in along this dimension.static SDIndexinterval(Integer begin, Integer end)Represents all elements begin to end (think get row from beginning to end) Note these are static indices.static SDIndexinterval(Integer begin, Integer strides, Integer end)Represents all elements begin to end (think get row from beginning to end) Note these are static indices.static SDIndexinterval(Long begin, Long end)Represents all elements begin to end (think get row from beginning to end) Note these are static indices.static SDIndexinterval(Long begin, Long end, Boolean inclusive)Represents all elements begin to end (think get row from beginning to end) Note these are static indices.static SDIndexinterval(Long begin, Long strides, Long end)Represents all elements begin to end (think get row from beginning to end) Note these are static indices.static SDIndexinterval(Long begin, Long strides, Long end, Boolean inclusive)Represents all elements begin to end (think get row from beginning to end) Note these are static indices.static SDIndexinterval(SDVariable begin, SDVariable end)Represents all elements begin to end (think get row from beginning to end) Note these are dynamic indices.static SDIndexinterval(SDVariable begin, SDVariable strides, SDVariable end)Represents all elements begin to end (think get row from beginning to end) Note these are static indices.static SDIndexinterval(SDVariable begin, SDVariable strides, SDVariable end, SDVariable inclusive)Represents all elements begin to end (think get row from beginning to end) Note these are static indices.static SDIndexpoint(long i)Represents all elements at a singular point in this dimension (think row or column) This is a static indexstatic SDIndexpoint(long i, boolean keepDim)Represents all elements at a singular point in this dimension (think row or column) This is a static indexstatic SDIndexpoint(SDVariable i)Represents all elements at a singular point in this dimension (think row or column) Note this is the SDVariable version.static SDIndexpoint(SDVariable i, boolean keepDim)Represents all elements at a singular point in this dimension (think row or column) This is a dynamic index
-
-
-
Method Detail
-
all
public static SDIndex all()
Represents all the elements in along this dimension.- Returns:
-
point
public static SDIndex point(SDVariable i)
Represents all elements at a singular point in this dimension (think row or column) Note this is the SDVariable version. For static please usepoint(long)- Parameters:
i- the input index- Returns:
-
point
public static SDIndex point(long i)
Represents all elements at a singular point in this dimension (think row or column) This is a static index- Parameters:
i- the input index- Returns:
-
point
public static SDIndex point(SDVariable i, boolean keepDim)
Represents all elements at a singular point in this dimension (think row or column) This is a dynamic index- Parameters:
i- the input index- Returns:
-
point
public static SDIndex point(long i, boolean keepDim)
Represents all elements at a singular point in this dimension (think row or column) This is a static index- Parameters:
i- the input index- Returns:
-
interval
public static SDIndex interval(SDVariable begin, SDVariable end)
Represents all elements begin to end (think get row from beginning to end) Note these are dynamic indices.- Parameters:
begin- the begin indexend- the end index- Returns:
-
interval
public static SDIndex interval(Long begin, Long end)
Represents all elements begin to end (think get row from beginning to end) Note these are static indices.- Parameters:
begin- the begin indexend- the end index- Returns:
-
interval
public static SDIndex interval(Long begin, Long end, Boolean inclusive)
Represents all elements begin to end (think get row from beginning to end) Note these are static indices.- Parameters:
begin- the begin indexend- the end index- Returns:
-
interval
public static SDIndex interval(Integer begin, Integer end)
Represents all elements begin to end (think get row from beginning to end) Note these are static indices.- Parameters:
begin- the begin indexend- the end index- Returns:
-
interval
public static SDIndex interval(Long begin, Long strides, Long end)
Represents all elements begin to end (think get row from beginning to end) Note these are static indices.- Parameters:
begin- the begin indexstrides- the stride to increment by to endend- the end index- Returns:
-
interval
public static SDIndex interval(Long begin, Long strides, Long end, Boolean inclusive)
Represents all elements begin to end (think get row from beginning to end) Note these are static indices.- Parameters:
begin- the begin indexstrides- the stride to increment by to endend- the end indexinclusive- whether the index is inclusive or not- Returns:
-
interval
public static SDIndex interval(Integer begin, Integer strides, Integer end)
Represents all elements begin to end (think get row from beginning to end) Note these are static indices.- Parameters:
begin- the begin indexstrides- the stride to increment by to endend- the end index- Returns:
-
interval
public static SDIndex interval(SDVariable begin, SDVariable strides, SDVariable end)
Represents all elements begin to end (think get row from beginning to end) Note these are static indices.- Parameters:
begin- the begin indexstrides- the stride to increment by to endend- the end index- Returns:
-
interval
public static SDIndex interval(SDVariable begin, SDVariable strides, SDVariable end, SDVariable inclusive)
Represents all elements begin to end (think get row from beginning to end) Note these are static indices.- Parameters:
begin- the begin indexstrides- the stride to increment by to endend- the end index- Returns:
-
-