public static GraphDsl.ReverseOps <TIn, TMat> Via <TIn, TOut, TMat>(this GraphDsl.ReverseOps <TIn, TMat> ops, UniformFanInShape <TIn, TOut> junction) where TIn : TOut { var inlet = Bind(ops, junction); return(ops.Builder.To(inlet)); }
public static GraphDsl.ReverseOps <TIn, TMat> Via <TIn, TOut, TMat>(this GraphDsl.ReverseOps <TIn, TMat> ops, UniformFanOutShape <TIn, TOut> junction) where TIn : TOut { var b = From(ops, junction); return(b.To(junction.In)); }
private static Inlet <TIn> Bind <TIn, TOut, TMat>(GraphDsl.ReverseOps <TIn, TMat> ops, UniformFanInShape <TIn, TOut> junction) where TIn : TOut { var b = ops.Builder; b.AddEdge(junction.Out, ops.In); return(GraphDsl.FindIn(b, junction, 0)); }
public static GraphDsl.Builder <TMat> From <TIn, TOut, TMat>(this GraphDsl.ReverseOps <TIn, TMat> ops, FlowShape <TIn, TOut> flow) where TIn : TOut { var b = ops.Builder; b.AddEdge(flow.Outlet, ops.In); return(b); }
public static GraphDsl.Builder <TMat> From <TIn, TOut, TMat>(this GraphDsl.ReverseOps <TIn, TMat> ops, SourceShape <TOut> source) where TIn : TOut { var b = ops.Builder; b.AddEdge(source.Outlet, ops.In); return(b); }
public static GraphDsl.Builder <TMat> From <TIn, TOut, TMat>(this GraphDsl.ReverseOps <TIn, TMat> ops, Outlet <TOut> outlet) where TIn : TOut { var b = ops.Builder; b.AddEdge(outlet, ops.In); return(b); }
public static GraphDsl.Builder <TMat> From <TIn, TOut1, TOut2, TMat>(this GraphDsl.ReverseOps <TIn, TMat> ops, UniformFanOutShape <TOut1, TOut2> junction) where TIn : TOut2 { var b = ops.Builder; var count = junction.Outlets.Count(); for (var n = 0; n < count; n++) { var outlet = junction.Out(n); if (!b.Module.Downstreams.ContainsKey(outlet)) { b.AddEdge(outlet, ops.In); return(b); } } throw new ArgumentException("No more inlets free on junction", nameof(junction)); }
public static GraphDsl.ReverseOps <TOut1, TMat> Via <TIn, TOut1, TOut2, TMat>(this GraphDsl.ReverseOps <TIn, TMat> ops, IGraph <FlowShape <TOut1, TOut2>, TMat> flow) where TIn : TOut2 { var b = ops.Builder; var f = b.Add(flow); b.AddEdge(f.Outlet, ops.In); return(new GraphDsl.ReverseOps <TOut1, TMat>(b, f.Inlet)); }
public static GraphDsl.Builder <TMat> From <TIn, TOut, TMat>(this GraphDsl.ReverseOps <TIn, TMat> ops, UniformFanInShape <TIn, TOut> junction) where TIn : TOut { Bind(ops, junction); return(ops.Builder); }