Class Rename


  • public class Rename
    extends PrimitiveTensorFunction
    The rename tensor function returns a tensor where some dimensions are assigned new names.
    Author:
    bratseth
    • Constructor Detail

      • Rename

        public Rename​(TensorFunction argument,
                      java.lang.String fromDimension,
                      java.lang.String toDimension)
      • Rename

        public Rename​(TensorFunction argument,
                      java.util.List<java.lang.String> fromDimensions,
                      java.util.List<java.lang.String> toDimensions)
    • Method Detail

      • fromDimensions

        public java.util.List<java.lang.String> fromDimensions()
      • toDimensions

        public java.util.List<java.lang.String> toDimensions()
      • toPrimitive

        public PrimitiveTensorFunction toPrimitive()
        Description copied from class: TensorFunction
        Translate this function - and all of its arguments recursively - to a tree of primitive functions only.
        Specified by:
        toPrimitive in class TensorFunction
        Returns:
        a tree of primitive functions implementing this
      • type

        public <NAMETYPE extends TypeContext.NameTensorType type​(TypeContext<NAMETYPE> context)
        Description copied from class: TensorFunction
        Returns the type of the tensor this produces given the input types in the context
        Specified by:
        type in class TensorFunction
        Parameters:
        context - a context which must be passed to all nexted functions when evaluating
      • toString

        public java.lang.String toString​(ToStringContext context)
        Description copied from class: TensorFunction
        Return a string representation of this context.
        Specified by:
        toString in class TensorFunction
        Parameters:
        context - a context which must be passed to all nested functions when requesting the string value