Defining Graphs and Graph Processing Logic Using Decision Tables - Gnorion/BizVR GitHub Wiki
Defining Graphs and Graph Processing Logic Using Decision Tables
This graph:
could be represented using this decision table:
We can easily add arbitrarily many properties for the nodes and edges.
This can also be represented as a json structure:
{
"nodes": [
{ "id": "mike", "label": "mike" },
{ "id": "richard", "label": "richard" },
{ "id": "ryan", "label": "ryan" },
{ "id": "jonathan", "label": "jonathan" }
],
"edges": [
{ "source": "mike", "target": "richard", "label": "parent", "color": "red" },
{ "source": "richard", "target": "ryan", "label": "sibling", "color": "blue", "style": "dotted" },
{ "source": "richard", "target": "jonathan", "label": "sibling", "color": "blue", "style": "dotted" }
]
}
Or as a GraphViz definition:
digraph U {size="20,20";
mike->richard [label=parent,color=red]
richard->ryan [label=sibling,color=blue,style=dotted]
richard->jonathan [label=sibling,color=blue,style=dotted]
}