org._3pq.jgrapht.edge

Class UndirectedWeightedEdge

Implemented Interfaces:
Cloneable, Edge, Serializable

public class UndirectedWeightedEdge
extends UndirectedEdge

An implementation of undirected weighted edge.
Author:
Barak Naveh
Since:
Jul 16, 2003

Fields inherited from interface org._3pq.jgrapht.Edge

DEFAULT_EDGE_WEIGHT

Constructor Summary

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

Method Summary

double
getWeight()
void
setWeight(double weight)

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

toString

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

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

Constructor Details

UndirectedWeightedEdge

public UndirectedWeightedEdge(Object sourceVertex,
                              Object targetVertex)

UndirectedWeightedEdge

public UndirectedWeightedEdge(Object sourceVertex,
                              Object targetVertex,
                              double weight)
Constructor for UndirectedWeightedEdge.
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