Open Parvfect opened 1 year ago
Preliminary look into it resulted in -
def visualise(self):
""" Visualise Tanner Graph """
G = nx.Graph()
rows = len(self.cns)
cols = len(self.vns)
# For each row add a check node
for i in range(rows):
G.add_node(i, bipartite=0)
# For each column add a variable node
for i in range(cols):
G.add_node(i + rows, bipartite=1)
# Utilise the links to add edges
for (i,j) in enumerate(self.cns):
for k in j.links:
G.add_edge(i, k + rows, weight=1)
But, does not work :( Currently attempting to utilise networkx for the visualisation, may be worth looking at alternatives. Should not be too difficult.
Having a Visual would just be incredible for the Tanner Data Structure.