Esempio n. 1
0
        public static void SetCall(this GraphBuilder builder, Primitive ofTheCall, params int[] argumentsThenResult)
        {
            var types = argumentsThenResult.Select(s => (IState)ofTheCall).ToArray();

            builder.SetCall(types, argumentsThenResult);
        }
Esempio n. 2
0
        public static void SetReverse(this GraphBuilder graph, int arrId, int resultId)
        {
            var t = graph.InitializeVarNode();

            graph.SetCall(new[] { Array.Of(t), Array.Of(t) }, new[] { arrId, resultId });
        }
Esempio n. 3
0
 public static void SetBoolCall(this GraphBuilder builder, int leftId, int rightId, int resultId)
 {
     builder.SetCall(
         argThenReturnTypes: new IState[] { Primitive.Bool, Primitive.Bool, Primitive.Bool },
         argThenReturnIds: new[] { leftId, rightId, resultId });
 }
Esempio n. 4
0
        public static void SetSumCall(this GraphBuilder builder, int argId, int resultId)
        {
            var varNode = builder.InitializeVarNode(Primitive.U24, Primitive.Real);

            builder.SetCall(new IState[] { Array.Of(varNode), varNode }, new [] { argId, resultId });
        }