@Beta public class Rename extends PrimitiveTensorFunction
Modifier and Type | Field and Description |
---|---|
private TensorFunction |
argument |
private List<String> |
fromDimensions |
private List<String> |
toDimensions |
Constructor and Description |
---|
Rename(TensorFunction argument,
List<String> fromDimensions,
List<String> toDimensions) |
Modifier and Type | Method and Description |
---|---|
Tensor |
evaluate(EvaluationContext context)
Evaluates this tensor.
|
private Map<String,String> |
fromToMap() |
List<TensorFunction> |
functionArguments()
Returns the function arguments of this node in the order they are applied
|
private TensorAddress |
rename(TensorAddress address,
int[] toIndexes) |
private TensorType |
rename(TensorType type,
Map<String,String> fromToMap) |
TensorFunction |
replaceArguments(List<TensorFunction> arguments)
Returns a copy of this tensor function with the arguments replaced by the given list of arguments.
|
PrimitiveTensorFunction |
toPrimitive()
Translate this function - and all of its arguments recursively -
to a tree of primitive functions only.
|
String |
toString(ToStringContext context)
Return a string representation of this context.
|
private String |
toVectorString(List<String> elements) |
evaluate, toString
private final TensorFunction argument
public Rename(TensorFunction argument, List<String> fromDimensions, List<String> toDimensions)
public List<TensorFunction> functionArguments()
TensorFunction
functionArguments
in class TensorFunction
public TensorFunction replaceArguments(List<TensorFunction> arguments)
TensorFunction
replaceArguments
in class TensorFunction
public PrimitiveTensorFunction toPrimitive()
TensorFunction
toPrimitive
in class TensorFunction
public Tensor evaluate(EvaluationContext context)
TensorFunction
evaluate
in class TensorFunction
context
- a context which must be passed to all nexted functions when evaluatingprivate TensorType rename(TensorType type, Map<String,String> fromToMap)
private TensorAddress rename(TensorAddress address, int[] toIndexes)
public String toString(ToStringContext context)
TensorFunction
toString
in class TensorFunction
context
- a context which must be passed to all nexted functions when requesting the string valueCopyright © 2017. All rights reserved.