Package com.yahoo.tensor.evaluation
Class MapEvaluationContext
- java.lang.Object
-
- com.yahoo.tensor.evaluation.MapEvaluationContext
-
- All Implemented Interfaces:
EvaluationContext<TypeContext.Name>
,TypeContext<TypeContext.Name>
public class MapEvaluationContext extends java.lang.Object implements EvaluationContext<TypeContext.Name>
- Author:
- bratseth
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.yahoo.tensor.evaluation.TypeContext
TypeContext.Name
-
-
Constructor Summary
Constructors Constructor Description MapEvaluationContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tensor
getTensor(java.lang.String name)
Returns the tensor bound to this name, or null if noneTensorType
getType(TypeContext.Name name)
Returns the type of the tensor with this name.TensorType
getType(java.lang.String name)
Returns the type of the tensor with this name by converting from a string name.void
put(java.lang.String name, Tensor tensor)
-
-
-
Method Detail
-
put
public void put(java.lang.String name, Tensor tensor)
-
getType
public TensorType getType(java.lang.String name)
Description copied from interface:TypeContext
Returns the type of the tensor with this name by converting from a string name.- Specified by:
getType
in interfaceTypeContext<TypeContext.Name>
- Returns:
- returns the type of the tensor which will be returned by calling getTensor(name) or null if getTensor will return null.
-
getType
public TensorType getType(TypeContext.Name name)
Description copied from interface:TypeContext
Returns the type of the tensor with this name.- Specified by:
getType
in interfaceTypeContext<TypeContext.Name>
- Returns:
- returns the type of the tensor which will be returned by calling getTensor(name) or null if getTensor will return null.
-
getTensor
public Tensor getTensor(java.lang.String name)
Description copied from interface:EvaluationContext
Returns the tensor bound to this name, or null if none- Specified by:
getTensor
in interfaceEvaluationContext<TypeContext.Name>
-
-