2021-10-21 01:31:33 +03:00
|
|
|
|
import 'src/graph.dart';
|
|
|
|
|
|
|
|
|
|
void main(List<String> arguments) {
|
2021-10-22 15:50:52 +03:00
|
|
|
|
Map<int, int> x = {1: 10, 2: 20};
|
|
|
|
|
var p = Dot.fromMap("Т1", x);
|
2021-10-21 15:37:43 +03:00
|
|
|
|
p.printD();
|
|
|
|
|
x = <int, int>{};
|
2021-10-22 15:50:52 +03:00
|
|
|
|
|
|
|
|
|
x[1] = 11;
|
|
|
|
|
var p2 = Dot.fromMap("Т2", x);
|
|
|
|
|
p2.printD();
|
2021-10-21 15:37:43 +03:00
|
|
|
|
x = <int, int>{};
|
2021-10-22 15:50:52 +03:00
|
|
|
|
|
|
|
|
|
var x1 = Graphs.fromList("Граф 1", [p, p2], true, false);
|
|
|
|
|
x1.addDot(p);
|
|
|
|
|
x1.addDotFromToLists("T3", [1, 2], [10, 20]);
|
|
|
|
|
x1.addIsolated("T4");
|
2021-10-21 15:37:43 +03:00
|
|
|
|
x1.checkDots(true);
|
2021-10-21 01:31:33 +03:00
|
|
|
|
x1.printG();
|
2021-10-22 15:50:52 +03:00
|
|
|
|
print(x1.addPath(4, 1, 10));
|
|
|
|
|
print(x1.addPath(4, 2, 10));
|
|
|
|
|
x1.printG();
|
|
|
|
|
x1.toFile("outTest.txt");
|
2021-10-21 01:31:33 +03:00
|
|
|
|
}
|