Skip to content

Instantly share code, notes, and snippets.

@streamer45
Last active January 3, 2016 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save streamer45/8537062 to your computer and use it in GitHub Desktop.
Save streamer45/8537062 to your computer and use it in GitHub Desktop.
[streamer45@archlinux tests]$ ./kr_graph_test
graph created successfully!
graph info:
your graph is empty...
creating some vertices in our graph...
graph info:
vertex 0x2020010 of type INPUT
vertex 0x2020014 of type INPUT
vertex 0x2020018 of type BUS
vertex 0x202001c of type BUS
vertex 0x2020020 of type OUTPUT
graph info:
vertex 0x2020010 of type INPUT
vertex 0x2020014 of type INPUT
vertex 0x2020018 of type BUS
vertex 0x202001c of type BUS
vertex 0x2020020 of type OUTPUT
connecting some vertices together
connecting 0x2020010 to 0x2020014
connecting 0x2020014 to 0x2020018
So we would end having this kind of graph:
A+--------->B+-------->C (No cycles)
Cycled Denied!
0x2020014 to 0x2020018
graph info:
vertex 0x2020010 of type INPUT
vertex 0x2020014 of type INPUT
vertex 0x2020018 of type BUS
vertex 0x202001c of type BUS
vertex 0x2020020 of type OUTPUT
we have an edge from a INPUT 0x2020010 to INPUT 0x2020014
destroying graph now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment