// @(#)$Id: Graph.C,v 1.3 1999/04/11 15:57:36 leavens Exp $

#include "Graph.h"

template <class Node> 
Graph<Node>& Graph<Node>::addNode(Node n) throw()
{
  the_nodes.add(n);
  return *this;
}

template <class Node> 
Graph<Node>& Graph<Node>::removeNode(Node n) throw()
{
  the_nodes.remove(n);
  return *this;
}

template <class Node> 
Node Graph<Node>::chooseNode() const throw()
{
  return the_nodes.ident(choose)();
}

template <class Node> 
Set<Node>& Graph<Node>::nodes() const throw()
{
  return *(new Set<Node>(the_nodes));
}

template <class Node> 
int Graph<Node>::numOfNodes() const throw()
{
  return the_nodes.size();
}


