-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleaned up code and added correct_outputs.txt for test graphs
- Loading branch information
Showing
9 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
The graphs series of graphs are used to check the code's correctness. Except for internal tiebreaking by the solver, each result is deterministic. | ||
|
||
graph1: | ||
A B D | ||
B D D | ||
|
||
graph2: | ||
A B D | ||
B D D | ||
|
||
graph3: deals with tiebreaking | ||
A C D | ||
C D D | ||
|
||
graph4: | ||
A B D | ||
B D D | ||
|
||
graph5: | ||
A B U | ||
B D U | ||
|
||
graph6: | ||
A B U | ||
B D U | ||
|
||
graph7: deals with tiebreaking | ||
A B U | ||
B D U | ||
|
||
graph8: | ||
A B U | ||
B D U | ||
|
||
graph9: | ||
A B D | ||
B D U | ||
|
||
graph10: | ||
A B D | ||
B D D | ||
|
||
graph11: | ||
A B U | ||
B D U | ||
|
||
graph12: | ||
A B D | ||
B D D | ||
|
||
graph13: | ||
A B U | ||
B D U |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
A B 0.9 D | ||
A C 0.1 D | ||
B D 0.8 D | ||
C D 0.2 D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
A B 0.9 U | ||
A C 0.1 U | ||
B D 0.8 U | ||
C D 0.2 U |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
The tests series of graphs are used to verify whether the code is executing appropriately depending on distinct edge cases. | ||
|
||
test 1: check if unique directed edges are added to directed_dict | ||
Output: | ||
A B D | ||
B C D | ||
|
||
test2: check if higher edge weight is selected for the same directed edge from the input | ||
Output: | ||
A B D | ||
B D D | ||
|
||
test3: If a directed edge is present in the input and an undirected edge from that edge already exists, the directed edge is prioritized and added to directed_dict and the undirected edge is deleted from undirected_dict. | ||
A C D | ||
C D D | ||
|
||
test4: check if unique undirected edges are added to undirected_dict | ||
A B D | ||
B D D | ||
|
||
test5: check that an undirected edge is not added if a directed edge of that edge already exists | ||
A B U | ||
B D U | ||
|
||
test6: check if higher edge weight is selected for the same undirected edge from the input | ||
A B U | ||
B D U | ||
|
||
test7: check that code still runs and outputs an error message with an empty edges.txt | ||
A B U | ||
B D U |