Commit d68658c1 authored by gsavin's avatar gsavin

Remove warnings

parent a8c7da23
......@@ -390,7 +390,7 @@ public class APSP extends SinkAdapter implements Algorithm {
// The Floyd-Warshall algorithm. You can easily see it is in O(n^3)..
int z = 0;
// int z = 0;
double prog = 0;
double max = nodeList.size();
max *= max;
......@@ -430,7 +430,7 @@ public class APSP extends SinkAdapter implements Algorithm {
prog += 1;
}
z++;
// z++;
// System.err.printf( "%3.2f%%%n", (z/((double)n))*100 );
}
}
......
......@@ -255,12 +255,11 @@ public class Kruskal extends AbstractSpanningTree {
* an edge
* @return weight of <i>e</i>
*/
@SuppressWarnings("unchecked")
protected Comparable getWeight(Edge e) {
if (!e.hasAttribute(weightAttribute))
protected Double getWeight(Edge e) {
if (!e.hasNumber(weightAttribute))
return Double.valueOf(1);
return (Comparable) e.getAttribute(weightAttribute, Comparable.class);
return e.getNumber(weightAttribute);
}
/**
......
......@@ -189,12 +189,11 @@ public class Prim extends AbstractSpanningTree {
* an edge
* @return weight of <i>n</i>
*/
@SuppressWarnings("unchecked")
protected Comparable getWeight(Edge e) {
if (!e.hasAttribute(weightAttribute))
protected Double getWeight(Edge e) {
if (!e.hasNumber(weightAttribute))
return Double.valueOf(1);
return (Comparable) e.getAttribute(weightAttribute, Comparable.class);
return e.getNumber(weightAttribute);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment