Vector cost proposed to TST on 2016-07-13
First part implemented: weight interface introduced and integrated, default weight implementation added.
Change-Id: Ia46f1b44139069aa171a3c13faf168351bd7cc56
diff --git a/utils/misc/src/main/java/org/onlab/graph/GraphPathSearch.java b/utils/misc/src/main/java/org/onlab/graph/GraphPathSearch.java
index d5513a7..1c1099d 100644
--- a/utils/misc/src/main/java/org/onlab/graph/GraphPathSearch.java
+++ b/utils/misc/src/main/java/org/onlab/graph/GraphPathSearch.java
@@ -66,7 +66,7 @@
*
* @return map of vertex to path cost bindings
*/
- Map<V, Double> costs();
+ Map<V, Weight> costs();
}
/**
@@ -76,12 +76,12 @@
* @param src optional source vertex
* @param dst optional destination vertex; if null paths to all vertex
* destinations will be searched
- * @param weight optional edge-weight; if null cost of each edge will be
- * assumed to be 1.0
+ * @param weigher optional edge-weigher; if null, {@link DefaultEdgeWeigher}
+ * will be used (assigns equal weights to all links)
* @param maxPaths limit on number of paths; {@link GraphPathSearch#ALL_PATHS} if no limit
* @return search results
*/
Result<V, E> search(Graph<V, E> graph, V src, V dst,
- EdgeWeight<V, E> weight, int maxPaths);
+ EdgeWeigher<V, E> weigher, int maxPaths);
}