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
9af1e8b0
Commit
9af1e8b0
authored
7 years ago
by
Lawrence Chung
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
e582961d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/search/CC.java
+2
-1
2 additions, 1 deletion
src/search/CC.java
src/search/DepthFirstSearch.java
+3
-0
3 additions, 0 deletions
src/search/DepthFirstSearch.java
src/sort/MergeSort.java
+2
-2
2 additions, 2 deletions
src/sort/MergeSort.java
src/sort/Range.java
+5
-8
5 additions, 8 deletions
src/sort/Range.java
with
12 additions
and
11 deletions
src/search/CC.java
+
2
−
1
View file @
9af1e8b0
...
...
@@ -21,6 +21,7 @@ public class CC {
System
.
out
.
println
(
component
.
id
(
0
));
System
.
out
.
println
(
component
.
id
(
5
));
System
.
out
.
println
(
component
.
id
(
6
));
System
.
out
.
println
(
component
.
count
());
}
/**
* Constructor for Connected Component
...
...
@@ -62,7 +63,7 @@ public class CC {
/**
* accesses the value of component id
* @param v indexed value
* @return
value at index v
* @return
The component id
*/
public
int
id
(
int
v
){
return
id
[
v
];
...
...
This diff is collapsed.
Click to expand it.
src/search/DepthFirstSearch.java
+
3
−
0
View file @
9af1e8b0
...
...
@@ -13,6 +13,9 @@ public class DepthFirstSearch {
g
.
addEdge
(
1
,
2
);
g
.
addEdge
(
0
,
2
);
DepthFirstSearch
s
=
new
DepthFirstSearch
(
g
,
g
.
V
());
for
(
int
i
=
0
;
i
<
5
;
i
++){
System
.
out
.
println
(
s
.
marked
(
i
));
}
}
public
DepthFirstSearch
(
Graph
G
,
int
s
){
...
...
This diff is collapsed.
Click to expand it.
src/sort/MergeSort.java
+
2
−
2
View file @
9af1e8b0
<<<<<<<
HEAD
package
sort
;
public
class
MergeSort
{
...
...
@@ -144,4 +144,4 @@ public class MergeSort{
}
}
}
>>>>>>>
b9cba827252461540a3adde3e53442162b843b0f
This diff is collapsed.
Click to expand it.
src/sort/Range.java
+
5
−
8
View file @
9af1e8b0
...
...
@@ -37,15 +37,12 @@ public class Range<Key extends Comparable<Key>> {
this
.
boundType
=
bt
;
}
<<<<<<<
HEAD
public
<
T
>
boolean
inBounds
(
T
key
)
{
=======
<<<<<<<
HEAD
public
<
T
>
boolean
inBounds
(
T
key
)
{
=======
//<<<<<<< HEAD
// public <T> boolean inBounds(T key) {
//=======
public
boolean
inBounds
(
Key
key
,
GeneralCompare
<
Key
>
gc
)
{
>>>>>>>
fd3aa70
...
add
Bound
and
Range
>>>>>>>
refs
/
remotes
/
origin
/
master
if
(
boundType
==
Bound
.
ANY
)
return
true
;
else
if
(
boundType
==
Bound
.
LOWER
)
return
gc
.
compare
(
lower
,
key
)
<=
0
;
else
if
(
boundType
==
Bound
.
UPPER
)
return
gc
.
compare
(
upper
,
key
)
>=
0
;
...
...
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