2021-10-21 01:31:33 +03:00
|
|
|
import 'src/graph.dart';
|
|
|
|
|
|
|
|
void main(List<String> arguments) {
|
|
|
|
Map<int, int> x = <int, int>{};
|
|
|
|
x[2] = 10;
|
2021-10-21 15:37:43 +03:00
|
|
|
x[4] = 50;
|
|
|
|
var p = Dot.fromMap("Точка 1", x);
|
|
|
|
p.printD();
|
|
|
|
x = <int, int>{};
|
|
|
|
var x1 = Graphs.fromList("Граф 1", [p], true);
|
|
|
|
x[1] = 5;
|
|
|
|
p = Dot.fromMap("Точка 2", x);
|
|
|
|
x1.addDot(p);
|
|
|
|
x1.printG();
|
|
|
|
x = <int, int>{};
|
2021-10-21 01:31:33 +03:00
|
|
|
x1.printG();
|
2021-10-21 15:37:43 +03:00
|
|
|
x1.addDot(Dot.fromTwoLists("T3", [1, 2], [10, 20]));
|
2021-10-21 01:31:33 +03:00
|
|
|
x1.printG();
|
2021-10-21 15:37:43 +03:00
|
|
|
x1.checkDots(true);
|
2021-10-21 01:31:33 +03:00
|
|
|
x1.printG();
|
2021-10-21 15:37:43 +03:00
|
|
|
x1.toFile("out.txt");
|
|
|
|
Graphs.fromFile("out.txt");
|
2021-10-21 01:31:33 +03:00
|
|
|
}
|