org._3pq.jgrapht.edge

Class DirectedWeightedEdge

Implemented Interfaces:
Cloneable, Edge, Serializable

public class DirectedWeightedEdge
extends DirectedEdge

An implementation of directed weighted edge.
Author:
Barak Naveh
Since:
Jul 14, 2003

Fields inherited from interface org._3pq.jgrapht.Edge

DEFAULT_EDGE_WEIGHT

Constructor Summary

DirectedWeightedEdge(Object sourceVertex, Object targetVertex)
DirectedWeightedEdge(Object sourceVertex, Object targetVertex, double weight)
Constructor for DirectedWeightedEdge.

Method Summary

double
getWeight()
void
setWeight(double weight)

Methods inherited from class org._3pq.jgrapht.edge.DirectedEdge

toString

Methods inherited from class org._3pq.jgrapht.edge.DefaultEdge

clone, containsVertex, getSource, getTarget, getWeight, oppositeVertex, setWeight

Constructor Details

DirectedWeightedEdge

public DirectedWeightedEdge(Object sourceVertex,
                            Object targetVertex)

DirectedWeightedEdge

public DirectedWeightedEdge(Object sourceVertex,
                            Object targetVertex,
                            double weight)
Constructor for DirectedWeightedEdge.
Parameters:
sourceVertex - source vertex of the new edge.
targetVertex - target vertex of the new edge.
weight - the weight of the new edge.

Method Details

getWeight

public double getWeight()
Specified by:
getWeight in interface Edge
Overrides:
getWeight in interface DefaultEdge

setWeight

public void setWeight(double weight)
Specified by:
setWeight in interface Edge
Overrides:
setWeight in interface DefaultEdge