You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2011/06/11 23:10:06 UTC
svn commit: r1134757 - in
/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph:
WeightedEdge.java WeightedGraph.java
Author: simonetripodi
Date: Sat Jun 11 21:10:06 2011
New Revision: 1134757
URL: http://svn.apache.org/viewvc?rev=1134757&view=rev
Log:
no need to have homogeneous weights in the graph; some edges can have weight Double, some Integer and so on...
Modified:
commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/WeightedEdge.java
commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/WeightedGraph.java
Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/WeightedEdge.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/WeightedEdge.java?rev=1134757&r1=1134756&r2=1134757&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/WeightedEdge.java (original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/WeightedEdge.java Sat Jun 11 21:10:06 2011
@@ -25,8 +25,8 @@ package org.apache.commons.graph;
*
* @param <W> the {@link Edge} weight.
*/
-public interface WeightedEdge<W extends Number>
- extends Edge, Comparable<WeightedEdge<Number>>
+public interface WeightedEdge
+ extends Edge, Comparable<WeightedEdge>
{
/**
@@ -34,6 +34,6 @@ public interface WeightedEdge<W extends
*
* @return the weight attribute of the WeightedEdge object
*/
- W getWeight();
+ Number getWeight();
}
Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/WeightedGraph.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/WeightedGraph.java?rev=1134757&r1=1134756&r2=1134757&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/WeightedGraph.java (original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/WeightedGraph.java Sat Jun 11 21:10:06 2011
@@ -28,7 +28,7 @@ package org.apache.commons.graph;
* @param <W> the {@link Edge} weight.
* @param <WE> the Graph weighted edges type
*/
-public interface WeightedGraph<V extends Vertex, W extends Number, WE extends WeightedEdge<W>>
+public interface WeightedGraph<V extends Vertex, WE extends WeightedEdge>
extends Graph<V, WE>
{
@@ -38,6 +38,6 @@ public interface WeightedGraph<V extends
* @param e the {@link Edge} reference.
* @return the weight attribute of the WeightedGraph object.
*/
- W getWeight( WE e );
+ Number getWeight( WE e );
}