I have a database of hex sequences stored as blob.
Each of them is a binary matrix representing the adjacency matrix of a directed graph.
I want to use the AdjacencyGraph
to plot the graphs.
It takes a binary matrix as parameter but the format is like {{0,1},{1,0}}.
I can definitely write a small piece of code to do the translation.
Just in case I'm reinventing the wheel, is there already a Mathematica function that handles this?
For example: 00000000000000C80000000000000040000000000000006800000000000000580000000000000008000000000000004500000000000000430000000000000001
then (8 bytes each row)
00000000000000C8
0000000000000040
0000000000000068
0000000000000058
0000000000000008
0000000000000045
0000000000000043
0000000000000001
then (ommit leading 0's)
C8
40
68
58
08
45
43
01
then (into binary format)
10101000
01000000
01101000
01011000
00001000
01000101
01000011
00000001
then (into Mathematica)
AdjacencyGraph[{{1, 0, 1, 0, 1, 0, 0, 0}, {0, 1, 0, 0, 0, 0, 0, 0}, {0, 1, 1, 0, 1, 0, 0, 0},
{0, 1, 0, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0, 0}, {0, 1, 0, 0, 0, 1, 0, 1},
{0, 1, 0, 0, 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0, 1}}, DirectedEdges -> True]