Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2XB3FinalProject
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Schankula
2XB3FinalProject
Commits
207977a6
Commit
207977a6
authored
7 years ago
by
Christopher Schankula
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of git@gitlab.cas.mcmaster.ca:schankuc/2XB3.git
parents
0faae404
433101e4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/search/Graph.java
+1
-1
1 addition, 1 deletion
src/search/Graph.java
src/test/TestGraph.java
+2
-11
2 additions, 11 deletions
src/test/TestGraph.java
with
3 additions
and
12 deletions
src/search/Graph.java
+
1
−
1
View file @
207977a6
...
...
@@ -50,7 +50,7 @@ public class Graph {
/**
* Method to access value in adjacency list
* @param V Vertex to be accessed
* @return
Value of vertex
V
* @return
Adjacency list at
V
*/
public
Iterable
<
Integer
>
adj
(
int
V
){
return
adj
[
V
];
...
...
This diff is collapsed.
Click to expand it.
src/test/TestGraph.java
+
2
−
11
View file @
207977a6
...
...
@@ -12,7 +12,7 @@ public class TestGraph {
}
@Test
public
void
testV
(){
public
void
testV
(){
//Tests if graph is constructed correctly
Graph
g
=
new
Graph
(
8
);
assertEquals
(
g
.
V
(),
8
);
assertNotEquals
(
g
.
V
(),
7
);
...
...
@@ -20,7 +20,7 @@ public class TestGraph {
}
@Test
public
void
testAddEdgeAndE
(){
public
void
testAddEdgeAndE
(){
//tests to see if edges are added to nodes, therefore increasing edge count
Graph
g
=
new
Graph
(
8
);
g
.
addEdge
(
4
,
3
);
g
.
addEdge
(
2
,
3
);
...
...
@@ -32,13 +32,4 @@ public class TestGraph {
assertNotEquals
(
g
.
E
(),
4
);
assertEquals
(
g
.
E
(),
5
);
}
@Test
public
void
adj
(){
Graph
g
=
new
Graph
(
8
);
g
.
addEdge
(
4
,
3
);
g
.
addEdge
(
2
,
3
);
g
.
addEdge
(
1
,
2
);
g
.
addEdge
(
0
,
2
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment