tom | e348941 | 2014-08-29 02:30:38 -0700 | [diff] [blame] | 1 | package org.onlab.graph; |
2 | |||||
3 | /** | ||||
4 | * Abstraction of a graph edge weight function. | ||||
5 | */ | ||||
6 | public interface EdgeWeight<V extends Vertex, E extends Edge<V>> { | ||||
7 | |||||
8 | /** | ||||
9 | * Returns the weight of the given edge as a unit-less number. | ||||
10 | * | ||||
11 | * @param edge edge to be weighed | ||||
12 | * @return edge weight as a unit-less number | ||||
13 | */ | ||||
14 | double weight(E edge); | ||||
15 | |||||
16 | } |