May be it is a novice question, I need your help to compare two graphs, having same number and name of the vertices.
Outline of my theme is:
Graph origG, computedG;
...
...
int nmbrSameEdges, nmbrExteraEdges, nmbrMissingEdges, nmbrIncorrectEdges;
void compareGraph(origG, computedG, nmbrSameEdges, nmbrExteraEdges, nmbrMissingEdges, nmbrIncorrectEdges);
Thanks in advance.
I thought I’d enjoy having a finger exercise at this:
Usage demo
The output (using Boost Spirit):
Note that sample code is commented that shows how to get print the diff results without using Boost Spirit, too.
Implementation