From 0db72d4912767ccb7058db654180f11fe701d7a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Hu=C5=A1ek?= <husek@iuuk.mff.cuni.cz> Date: Mon, 24 Jan 2022 11:13:25 +0100 Subject: [PATCH] add experiments/nice-voltage.py --- experiments/nice-voltage.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 experiments/nice-voltage.py diff --git a/experiments/nice-voltage.py b/experiments/nice-voltage.py new file mode 100755 index 0000000..0e72bfc --- /dev/null +++ b/experiments/nice-voltage.py @@ -0,0 +1,30 @@ +#!/usr/bin/python + +import sys, os +sys.path.append(os.path.dirname(__file__) + "/..") + +from itertools import permutations +from graph_tools.all import * +import json + +template = [10, [ + [0, 1], [1, 2], [1, 3], [2, 6], [2, 9], [3, 7], + [3, 8], [4, 5], [4, 6], [4, 9], [5, 7], [5, 8], + [6, 7], [8, 9], [0, 0] +]] + +assignment = [0, 0, 0, 0, 0, 0, 0, 2, 2, 0, -2, 0, 0, 0, 1] + +Seq = voltage_graph_zn_to_sequence(template, assignment) + +for i in range(3, 16): + G = Seq.graph(i).eval(UnderlyingGraph) + print(json.dumps({ + "i": i, + "graph": G.sparse6_string() + })) + +#X = Seq.stabilize(EdgeColoring(3)) +#p, l = stabilize_period(X, shift=1) +#print(p, l, l[p:]) + -- GitLab