Class SerializationContext


  • public class SerializationContext
    extends FunctionReferenceContext
    Context needed to serialize an expression to a string. This has the lifetime of a single serialization
    Author:
    bratseth
    • Method Detail

      • typeContext

        public Optional<com.yahoo.tensor.evaluation.TypeContext<Reference>> typeContext()
        Returns the type context of this, if it is able to resolve types.
      • addFunctionSerialization

        public void addFunctionSerialization​(String name,
                                             String expressionString)
        Adds the serialization of a function
      • addArgumentTypeSerialization

        public void addArgumentTypeSerialization​(String functionName,
                                                 String argumentName,
                                                 com.yahoo.tensor.TensorType type)
        Adds the serialization of the argument type to a function
      • addFunctionTypeSerialization

        public void addFunctionTypeSerialization​(String functionName,
                                                 com.yahoo.tensor.TensorType type)
        Adds the serialization of the return type of a function
      • needSerialization

        public boolean needSerialization​(String functionName)