Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0a82887
Changed Digraph to class with nested Vertex and Arc classes
michaelaah Aug 27, 2023
701cf2e
updated getVertex, constructor, getSize
michaelaah Aug 27, 2023
f8e39c9
Updated documentation and addVertex function
michaelaah Aug 27, 2023
c6ef0ce
Updated removeVertex
michaelaah Aug 27, 2023
5f3db82
Updated digraph to include types for storage T and weights K
michaelaah Aug 27, 2023
c9400bc
Updated the addArc method
michaelaah Aug 28, 2023
2b55480
Implemented Vertex and Arc constructors
michaelaah Aug 28, 2023
1b79be1
Implemented Vertex and Arc getters and setters
michaelaah Aug 28, 2023
4a42957
Updated Vertex removeArc method
michaelaah Aug 28, 2023
3b69934
Updated Vertex getWeight and changeWeight functions
michaelaah Aug 28, 2023
f27d01d
Copied over documentation for Vertex functions
michaelaah Aug 28, 2023
8cbc0c6
Updated removeArc and commnted out Vertex.h
michaelaah Aug 29, 2023
1505513
Updated setVisitedField for the graph object
michaelaah Aug 29, 2023
18f8be9
Resolving compilation errors
michaelaah Aug 29, 2023
8db004c
Created new file for new vertex implementation
michaelaah Sep 2, 2023
28ed610
Updating implementations to reflect map and not LinkedList
michaelaah Sep 2, 2023
745144f
Updating more implementations to reflect map and not LinkedList
michaelaah Sep 2, 2023
a8d1c70
removed Vertex and Arc class dec and imp from digraph header
michaelaah Sep 2, 2023
079adad
Resolving compilation errors
michaelaah Sep 2, 2023
29e3a64
Updated linkedList interface and resolving errors
michaelaah Sep 3, 2023
ff17581
Big fix for Vertex map initialization
michaelaah Oct 1, 2023
daf3a50
Resolved vertex and digraph addArc function bugs
michaelaah Oct 1, 2023
a3eca9e
Bug fix with addArc in vertex
michaelaah Oct 1, 2023
60c5333
debugging digraph and vertex removeArc function
michaelaah Oct 1, 2023
dfb29f0
Tested and fixed removeVertex
michaelaah Oct 7, 2023
e5cd239
Fixed and tested changeArcWeight
michaelaah Oct 7, 2023
cb8430c
Implemented and tested getArcWeight
michaelaah Oct 8, 2023
85ce3b9
Getting Source Vertex function ready
michaelaah Oct 8, 2023
2e25277
Implemented and tested vertex counting functions
michaelaah Oct 8, 2023
7cfb933
Implementing Source function
michaelaah Oct 9, 2023
eb8500d
Implementing smaller methods
michaelaah Oct 29, 2023
2bfa751
implemented buildTree, yet to test
michaelaah Oct 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions directed_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ int _connected_vertices_count_recursive(DirectedGraph* graph, void* origin)

/*
* The source_vertex function takes a DirectedGraph* struct pointer parameter and
* traverses the Directed Graph structure from each vertex. The vertex from which
* traverses the Directed Graph structure from each vertex. The first vertex from which
* all vertices can be visited is returned. If no such vertex exists, then NULL
* is returned.
*/
Expand Down Expand Up @@ -696,7 +696,7 @@ void set_visited_field(DirectedGraph* graph, bool value)
}

/*
* The reset_parent_links function changes the parent reference of eac vertex struct
* The reset_parent_links function changes the parent reference of each vertex struct
* within the DirectedGraph* struct to NULL.
*/
/*
Expand All @@ -722,6 +722,7 @@ void reset_parent_links(DirectedGraph* graph)
* accepts two vertex* structs as void*, casts them to Vertex*,
* and compares them based on their distance data member.
*/
/*
int compareVertex(void* a, void* b)
{
if(a == NULL || b == NULL)
Expand All @@ -733,7 +734,7 @@ int compareVertex(void* a, void* b)

return (int) v1->distance - v2->distance;
}

*/
/*
* This buildTree funciton implements dijkstra's algorithm. It takes a DirectedGraph* struct
* pointer and a void* origin vertex struct pointer, then creates a shotest path list by
Expand Down
Loading