/// <summary> /// Provides the surface of this function if it has been statically defined /// </summary> /// <param name="context">the context used to create the surface</param> /// <param name="explain"></param> /// <returns></returns> public override Surface CreateSurface(InterpretationContext context, ExplanationPart explain) { Surface retVal = null; IValue firstValue = context.FindOnStack(First).Value; IValue secondValue = context.FindOnStack(Second).Value; Surface firstSurface = createSurfaceForValue(context, firstValue, explain); if (firstSurface != null) { Surface secondSurface = createSurfaceForValue(context, secondValue, explain); if (secondSurface != null) { retVal = firstSurface.Min(secondSurface); } else { Second.AddError("Cannot create surface for " + Second); } } else { First.AddError("Cannot create surface for " + First); } return(retVal); }
/// <summary> /// Provides the graph of this function if it has been statically defined /// </summary> /// <param name="context">the context used to create the graph</param> /// <param name="parameter"></param> /// <param name="explain"></param> /// <returns></returns> public override Graph CreateGraph(InterpretationContext context, Parameter parameter, ExplanationPart explain) { Graph retVal = null; Graph firstGraph = createGraphForValue(context, context.FindOnStack(First).Value, explain); if (firstGraph != null) { Graph secondGraph = createGraphForValue(context, context.FindOnStack(Second).Value, explain); if (secondGraph != null) { retVal = firstGraph.Min(secondGraph) as Graph; } else { Second.AddError("Cannot create graph for " + Second); } } else { First.AddError("Cannot create graph for " + First); } return(retVal); }