/* --------------------------------------------------------------------

Copyright (c) 1996 by Christopher R. Waterson. All rights reserved.

Permission to use, copy, modify, and distribute this software
and its documentation for NON-COMMERCIAL purposes and without
fee is hereby granted provided that this copyright notice
appears in all copies.

$Id: WeightedGraphArc.java 1.2 1996/06/19 03:10:15 waterson Exp $

File:		WeightedGraphArc.java
Synopsis:	A graph arc that has a weight associated with it
Created:	1996/06/18 waterson
Modified:	$Date: 1996/06/19 03:10:15 $ $Author: waterson $

-------------------------------------------------------------------- */


/**
 * An arc in a graph that has a continuous valued weight
 * associated with it.
 */

public class WeightedGraphArc
extends GraphArc {
	/**
	 * The weight of the arc
	 */

	double m_weight;


	/**
	 * Create a new WeightedGraphArc with the specified weight
	 */

	public WeightedGraphArc(Object from, Object to, double weight) {
		super(from, to);
		m_weight = weight;
	}


	/**
	 * Return the weight of the arc.
	 */

	public double getWeight() {
		return m_weight;
	}



	/**
	 * Set the weight of the arc
	 */

	public void setWeight(double weight) {
		m_weight = weight;
	}
}



