tom | e348941 | 2014-08-29 02:30:38 -0700 | [diff] [blame] | 1 | package org.onlab.graph; |
| 2 | |
| 3 | /** |
| 4 | * Representation of a graph search algorithm and its outcome. |
| 5 | * |
| 6 | * @param <V> vertex type |
| 7 | * @param <E> edge type |
| 8 | */ |
| 9 | public interface GraphSearch<V extends Vertex, E extends Edge<V>> { |
| 10 | |
| 11 | /** |
| 12 | * Notion of a graph search result. |
| 13 | */ |
| 14 | public interface Result<V extends Vertex, E extends Edge<V>> { |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Searches the specified graph. |
| 19 | * |
| 20 | * @param graph graph to be searched |
| 21 | * @param weight optional edge-weight; if null cost of each edge will be |
| 22 | * assumed to be 1.0 |
| 23 | * |
| 24 | * @return search results |
| 25 | */ |
| 26 | Result search(Graph<V, E> graph, EdgeWeight<V, E> weight); |
| 27 | |
| 28 | } |