public static GraphBuilder CreateTree(int count, PropertyConsoleReader cr) { var gb = new GraphBuilder(count, false); for (var i = 1; i < count; i++) { gb.Add(cr.Int0, cr.Int0); } return(gb); }
public static WUIntGraphBuilder Create(int count, PropertyConsoleReader cr, int edgeCount, bool isDirected) { var gb = new WUIntGraphBuilder(count, isDirected); for (var i = 0; i < edgeCount; i++) { gb.Add(cr.Int0, cr.Int0, (uint)cr.ULong); } return(gb); }
public static GraphBuilder <int> CreateWithEdgeIndex(int count, PropertyConsoleReader cr, int edgeCount, bool isDirected) { var gb = new GraphBuilder <int>(count, isDirected); for (var i = 0; i < edgeCount; i++) { gb.Add(cr.Int0, cr.Int0, i); } return(gb); }
public Program(PropertyConsoleReader r, ConsoleWriter w) { this.cr = r; this.cw = w; CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; }
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 Grid <int> GridInt(this PropertyConsoleReader cr, int H, int W, int defaultValue) => Create(cr.Repeat(H).Select(cr => cr.Repeat(W).Int), defaultValue);
public static Grid <char> GridString(this PropertyConsoleReader cr, int H, char defaultValue) => Create(cr.Repeat(H).Ascii, defaultValue);
public static Grid <char> GridString(this PropertyConsoleReader cr, int H) => Create(cr.Repeat(H).Ascii);