Skip to content
Snippets Groups Projects
Commit 9af1e8b0 authored by Lawrence Chung's avatar Lawrence Chung
Browse files

fix

parent e582961d
No related branches found
No related tags found
No related merge requests found
......@@ -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];
......
......@@ -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){
......
<<<<<<< HEAD
package sort;
public class MergeSort{
......@@ -144,4 +144,4 @@ public class MergeSort{
}
}
}
>>>>>>> b9cba827252461540a3adde3e53442162b843b0f
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment