/**This is a class that represents a node,
***Written by Chris Hanusa on January 26, 2006.
**/

class Node
{
    private int weight; 
    private int name;

    /***Definitions***/
    Node()
    {
        this.name=-1;
	this.weight=0;
    }
    Node(int n)
    {
        this.name=n;
	this.weight=0;
    }
    Node(int n, int a)
    {
        this.name=n;
	this.weight=a;
    }

    /***The data in a node are private.  In order to modify them, use these methods.***/
    public void new_name(int n)
    {
	this.name=n;
    }
    public void new_weight(int a)
    {
	this.weight=a;
    }

    /***The data in a node are private.  In order to access them, use these methods.***/
    public int weight()       
    {
	return this.weight;   //this tells what the weight associated to the vertex is.
    }
    public int name()       
    {
	return this.name;   //this tells what the name associated to the vertex is.
    }

    /***Determines if the weight of this node is zero.***/
    public boolean iszero()
    {
	return(this.weight==0);
    }
}
