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
cc9c3b31
Commit
cc9c3b31
authored
6 years ago
by
Lawrence Chung
Browse files
Options
Downloads
Patches
Plain Diff
remove unneeded constructor
parent
a8911afa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/search/Graph.java
+4
-16
4 additions, 16 deletions
src/search/Graph.java
with
4 additions
and
16 deletions
src/search/Graph
Build
.java
→
src/search/Graph.java
+
4
−
16
View file @
cc9c3b31
package
search
;
public
class
Graph
Build
{
public
class
Graph
{
private
final
int
V
;
// Number of nodes
private
int
E
;
// Number of edges
...
...
@@ -9,12 +9,13 @@ public class GraphBuild {
public
static
void
main
(
String
[]
args
)
{
int
[]
testArray
=
{
6
,
6
,
0
,
3
,
1
,
5
,
2
,
3
,
3
,
5
,
4
,
7
,
5
,
6
};
Graph
Build
gb
=
new
Graph
Build
(
testArray
);
Graph
gb
=
new
Graph
(
testArray
);
System
.
out
.
println
(
gb
.
E
());
System
.
out
.
println
(
gb
.
V
());
}
public
Graph
Build
(
int
V
){
public
Graph
(
int
V
){
this
.
V
=
V
;
this
.
E
=
0
;
adj
=
(
Fish
<
Integer
>[])
new
Fish
[
V
];
...
...
@@ -22,19 +23,6 @@ public class GraphBuild {
adj
[
v
]
=
new
Fish
<
Integer
>();
}
public
GraphBuild
(
int
[]
x
){
this
(
x
[
0
]);
E
=
x
[
1
];
int
i
=
2
;
while
(
i
<
x
.
length
){
int
v
=
x
[
i
];
int
w
=
x
[
i
++];
addEdge
(
v
,
w
);
i
++;
E
--;
}
}
public
int
V
(){
return
V
;
}
...
...
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