Graph is a program which builds simple graphs as defined in graph theory of MATH239 at University of Waterloo. This means you can build a graph and query the program on the graph's connectivity, if it's isomorphic to another graph, or find a spanning tree, etc.
Graph is still a work in progress. A basic command line interpreter is now available. Also in the plan is a gui front-end, though I'm still considering which framework to use.
To build Graph, you'll need rake and a compiler conforming to the C++11 standard.
EXITINFOHELPCREATE GRAPH;CREATE VERTEX AT GRAPH <Graph ID>;JOIN VERTEX <Vertex1 ID> AND <Vertex2 ID>;DISJOIN VERTEX <Vertex1 ID> AND <Vertex2 ID>;HAS CYCLE AT GRAPH <Graph ID>;HAS PATH AT VERTEX <Vertex1 ID> AND <Vertex2 ID> AT GRAPH <Graph ID>;HAS SPANNINGTREE AT GRAPH <Graph ID>;
rakeorrake helpoutputs help message.rake infooutputs project related information.rake buildbuilds the project normally.rake debuglinks the test framework to the project for testing.rake runruns the executable.rake testruns the executable within valgrind (with --leak-check=full).
Graph/ ---> doc/ [Documentation]
---> ext/ [External libraries/resources]
---> obj/ [Object files (not synced)]
---> src/ [Source files]
---> test/ [Unit test source files]
---> rakefile
---> readme.md
---> test_results.log [Log file (not synced)]
---> ...more misc stuff
src/ ---> common/
---> controller/
---> external/
---> model/
---> view/
---> main.cpp
srcis the place for all program source code.commonis for facilities such as exception handling.modelhandles internal logic of the program.controllerhandles communication betweenviewandmodel.viewis the user interface component.
test/ ---> _include/
---> test_core/
---> test_suites/
---> test_main.cpp
testis the place for all testing related code._includeis for all the header files.test_coreis the part handling core logic of the test framework.test_suitesstores individual tests.
To add a new test, create files corresponding to the sample test and modify accordingly.