Package ai.libs.jaicore.ml.cache
Class InstructionGraph
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<InstructionNode>
-
- ai.libs.jaicore.ml.cache.InstructionGraph
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<InstructionNode>,java.util.Collection<InstructionNode>,java.util.List<InstructionNode>,java.util.RandomAccess
public class InstructionGraph extends java.util.ArrayList<InstructionNode>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InstructionGraph()InstructionGraph(InstructionGraph toClone)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InstructionNodeaddNode(java.lang.String name, Instruction instruction)InstructionNodeaddNode(java.lang.String name, Instruction instruction, java.util.List<ai.libs.jaicore.basic.sets.Pair<java.lang.String,java.lang.Integer>> inputs)booleanequals(java.lang.Object obj)static InstructionGraphfromJson(java.lang.String jsonRepresentation)IDatasetgetDataForUnit(ai.libs.jaicore.basic.sets.Pair<java.lang.String,java.lang.Integer> unit)Recursively computes the data for a node in the graphInstructionNodegetNodeByName(java.lang.String name)inthashCode()-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Constructor Detail
-
InstructionGraph
public InstructionGraph()
-
InstructionGraph
public InstructionGraph(InstructionGraph toClone)
-
-
Method Detail
-
fromJson
public static InstructionGraph fromJson(java.lang.String jsonRepresentation) throws java.io.IOException
- Throws:
java.io.IOException
-
addNode
public InstructionNode addNode(java.lang.String name, Instruction instruction)
-
addNode
public InstructionNode addNode(java.lang.String name, Instruction instruction, java.util.List<ai.libs.jaicore.basic.sets.Pair<java.lang.String,java.lang.Integer>> inputs)
-
getNodeByName
public InstructionNode getNodeByName(java.lang.String name)
-
getDataForUnit
public IDataset getDataForUnit(ai.libs.jaicore.basic.sets.Pair<java.lang.String,java.lang.Integer> unit) throws InstructionFailedException, java.lang.InterruptedException
Recursively computes the data for a node in the graph- Parameters:
unit-- Returns:
- Throws:
InstructionFailedExceptionjava.lang.InterruptedException
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Collection<InstructionNode>- Specified by:
hashCodein interfacejava.util.List<InstructionNode>- Overrides:
hashCodein classjava.util.ArrayList<InstructionNode>
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacejava.util.Collection<InstructionNode>- Specified by:
equalsin interfacejava.util.List<InstructionNode>- Overrides:
equalsin classjava.util.ArrayList<InstructionNode>
-
-