From a7c0a3babedf76a1d0ecdf8125464e097ec785d1 Mon Sep 17 00:00:00 2001 From: John Breaux Date: Sat, 23 Apr 2022 20:16:15 -0500 Subject: [PATCH] Update file headers and includes --- Makefile | 2 +- src/graph.cpp | 2 +- src/main.cpp | 30 ++++++++++++++++-------------- src/read.cpp | 4 +++- src/reducible.cpp | 5 ++++- 5 files changed, 25 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index a5a7e2f..9d460ff 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # +-------------+---------+-----------------------+ # | John Breaux | jab0910 | JohnBreaux@my.unt.edu | # +-------------+---------+-----------------------+ -# | Created 2022-04-04 Edited 2022-04-22 | +# | Created 2022-04-04 Updated 2022-04-22 | # +-----------------------------------------------+ # ---------- Variables listed below --------- # diff --git a/src/graph.cpp b/src/graph.cpp index b795d5f..b7fbfa6 100644 --- a/src/graph.cpp +++ b/src/graph.cpp @@ -1,7 +1,7 @@ /* +-------------+---------+-----------------------+ | John Breaux | jab0910 | JohnBreaux@my.unt.edu | +-------------+---------+-----------------------+ - | Created 2022-04-17 | + | Created 2022-04-17 Updated 2022-04-23 | +-----------------------------------------------+ */ #include "graph.hpp" // clang-format off diff --git a/src/main.cpp b/src/main.cpp index 44ae169..b3be782 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,13 +1,16 @@ -/* +-------------+---------+-----------------------+ - | John Breaux | jab0910 | JohnBreaux@my.unt.edu | - | | | | //TODO put your names here - +-------------+---------+-----------------------+ - | Created 2022-04-16 | - +-----------------------------------------------+ */ -#include "graph.hpp" // Graph reduction/Knot detection, struct adjmatrix +/* ╔════════════════╦══════════════════════════╗ + ║ John Breaux ║ JohnBreaux@my.unt.edu ║ + ║ Gabriel Castro ║ GabrielCastro@my.unt.edu ║ + ║ Michael Laymon ║ MichaelLaymon@my.unt.edu ║ + ╠════════════════╩══════════════════════════╣ + ║ Created 2022-04-16 Updated 2022-04-23 ║ + ╚═══════════════════════════════════════════╝ */ + +#include + +#include "graph.hpp" // graph, Graph reduction/Knot detection int main (int argc, char **argv) { - // TODO: Grab file name from args //? Command line argument structure? //? Other flags? What other features should this have? if (argc < 2) return 1; @@ -20,10 +23,9 @@ int main (int argc, char **argv) { return err; } g.print (); - - // TODO: Implement graph reduction and/or knot detection - printf ("Graph is %s\n", g.reducible () ? "not reducible! Deadlock!" : "reducible! No deadlock!"); //? - - // TODO: Destroy the graph created by read_file + // Graph reduction + printf ("Graph is %s\n", g.reducible () ? "not reducible! Deadlock!" : "reducible! No deadlock!"); + // TODO: Knot detection + // printf ("Graph is %s\n", g.knotted () ? "knotted! Deadlock!" : "not! No deadlock!"); return 0; -} \ No newline at end of file +} diff --git a/src/read.cpp b/src/read.cpp index d684498..e3726f1 100644 --- a/src/read.cpp +++ b/src/read.cpp @@ -1,12 +1,14 @@ /* +-------------+---------+-----------------------+ | John Breaux | jab0910 | JohnBreaux@my.unt.edu | +-------------+---------+-----------------------+ - | Created 2022-04-17 | + | Created 2022-04-17 Updated 2022-04-23 | +-----------------------------------------------+ */ #include "read.hpp" #include #include +#include +#include #include "graph.hpp" diff --git a/src/reducible.cpp b/src/reducible.cpp index 84eb36b..d3cbeb1 100644 --- a/src/reducible.cpp +++ b/src/reducible.cpp @@ -1,8 +1,11 @@ /* +-------------+---------+-----------------------+ | John Breaux | jab0910 | JohnBreaux@my.unt.edu | +-------------+---------+-----------------------+ - | Created 2022-04-22 | + | Created 2022-04-22 Updated 2022-04-23 | +-----------------------------------------------+ */ + +#include + #include "graph.hpp" using std::vector;