def runTest(self):
     t1 = MyGraph(dart_partitions=[[[]], []])
     t2 = MyGraph.extensions_of(t1)
     t3 = MyGraph.extensions_of(t2)
     self.assertEqual(len(t3), 2)
     t4 = MyGraph.extensions_of(t3)
     self.assertEqual(len(t4), 9)
Beispiel #2
0
from sparsity import MyGraph
from graphcollections import GraphCollection

graphs6 = GraphCollection('graphs6.json')

a = [
    MyGraph(dart_partitions=[dict(z) for z in x['dart_partitions']])
    for x in graphs6.data
]

b = MyGraph.extensions_of(a, no_iso_check=True)

raw7 = GraphCollection('raw7.json')

for g in b:
    raw7.insert(g)

raw7.commit()
from sparsity import MyGraph
from graphcollections import GraphCollection


a = [MyGraph(dart_partitions=[[[]],[]])]

for i in range(6):
    print("computing graphs with %s vertices"%str(i+2))
    a = MyGraph.extensions_of(a)
    fp = "mygraphs%s.json"%str(i+2)

    print("storing to %s"%fp)
    coll = GraphCollection(fp)
    for g in a:
        coll.insert(g)
    coll.commit()