Package org.nd4j.autodiff.samediff
Interface ArrayHolder
-
- All Known Implementing Classes:
OptimizedGraphArrayHolder,SingleThreadArrayHolder,ThreadSafeArrayHolder
public interface ArrayHolder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<String>arrayNames()INDArraygetArray(String name)booleanhasArray(String name)voidinitFrom(ArrayHolder arrayHolder)Initialize from the specified array holder.INDArrayremoveArray(String name)Remove the array from the ArrayHolder, returning it (if it exists)voidrename(String from, String to)Rename the entry with the specified namevoidsetArray(String name, INDArray array)Set the array for the specified name (new array, or replace if it already exists)intsize()
-
-
-
Method Detail
-
hasArray
boolean hasArray(String name)
- Returns:
- True if an array by that name exists
-
getArray
INDArray getArray(String name)
- Parameters:
name- Name of the array to get- Returns:
- The array, or null if no array with that name exists
-
setArray
void setArray(String name, INDArray array)
Set the array for the specified name (new array, or replace if it already exists)- Parameters:
name- Name of the arrayarray- Array to set
-
removeArray
INDArray removeArray(String name)
Remove the array from the ArrayHolder, returning it (if it exists)- Parameters:
name- Name of the array to return- Returns:
- The now-removed array
-
size
int size()
- Returns:
- Number of arrays in the ArrayHolder
-
initFrom
void initFrom(ArrayHolder arrayHolder)
Initialize from the specified array holder. This clears all internal arrays, and adds all arrays from the specified array holder- Parameters:
arrayHolder- Array holder to initialize this based on
-
arrayNames
Collection<String> arrayNames()
- Returns:
- Names of the arrays currently in the ArrayHolder
-
-