blob: 468685177a09e629e7a6d7d01ad847740f323092 [file] [log] [blame]
tome3489412014-08-29 02:30:38 -07001package 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 */
9public 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}