diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-04-13 23:11:36 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-04-13 23:11:36 -0400 |
| commit | 9adff31e86603493c2a245e1e803d951675d5e00 (patch) | |
| tree | 7374a6e4657333881db5621fbf23e18617470329 /BJC-Utils2/src/main/java/bjc/utils/graph/Graph.java | |
| parent | ba07771f8333f1b098ab8a9ec9fec886b72b9cc0 (diff) | |
Implemented new tree abstraction
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/graph/Graph.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/graph/Graph.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/graph/Graph.java b/BJC-Utils2/src/main/java/bjc/utils/graph/Graph.java index 8041604..a72304d 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/graph/Graph.java +++ b/BJC-Utils2/src/main/java/bjc/utils/graph/Graph.java @@ -10,8 +10,8 @@ import java.util.Set; import java.util.function.BiConsumer; import java.util.function.BiPredicate; -import bjc.utils.data.GenHolder; -import bjc.utils.data.IHolder; +import bjc.utils.data.experimental.IHolder; +import bjc.utils.data.experimental.Identity; import bjc.utils.funcdata.FunctionalMap; import bjc.utils.funcdata.IFunctionalList; import bjc.utils.funcdata.IFunctionalMap; @@ -155,7 +155,7 @@ public class Graph<T> { Set<T> visitedVertexes = new HashSet<>(); // Start at the initial vertex and visit it - IHolder<T> sourceVertex = new GenHolder<>(getInitial()); + IHolder<T> sourceVertex = new Identity<>(getInitial()); visitedVertexes.add(sourceVertex.unwrap(vertex -> vertex)); @@ -174,7 +174,7 @@ public class Graph<T> { // Get the edge with the minimum distance IHolder<Edge<T>> minimumEdge = - new GenHolder<>(availableEdges.poll()); + new Identity<>(availableEdges.poll()); // Only consider edges where we haven't visited the target of // the edge |
