public static WGraphBuilder <uint, int, UIntOperator> CreateWithEdgeIndex(int count, PropertyConsoleReader cr, int edgeCount, bool isDirected) { var gb = new WGraphBuilder <uint, int, UIntOperator>(count, isDirected); for (var i = 0; i < edgeCount; i++) { gb.Add(cr.Int0, cr.Int0, (uint)cr.ULong, i); } return(gb); }
public static MfGraph <T, TOp> ToMFGraph <T, TOp>(this WGraphBuilder <T, TOp> gb) where T : struct where TOp : struct, INumOperator <T> { var mfg = new MfGraph <T, TOp>(gb.edgeContainer.Length); foreach (var(i, e) in gb.edgeContainer.edges) { mfg.AddEdge(i, e.To, e.Value); } return(mfg); }