/* File: citygraph.h
 * Desc: interface of a cityPair graph ADT using an opaque type.
 * Cristina Cifuentes
 * 18 Aug 1997
 */

#ifndef _CITYGRAPH_H_
#define _CITYGRAPH_H_
#include "cities.h"	/* cityPair */
#include "bool.h"	/* bool type */


typedef struct _Graph *Graph;


Graph graphNew (void);
/* Returns an empty Graph */

bool graphEmpty (Graph);
/* Returns whether the Graph is empty or not */

void addCityPairDistance (Graph, cityPair, int);
/* Adds a cityPair and the distance between them to the Graph.  */

int distanceBetweenCities (Graph, cityPair);
/* Returns the distance between a pair of cities.  If there is no
 * distance information available for the pair of cities, returns zero. */

void displayGraphContents (Graph);
/* Displays the pairs of cities & their distances.  Pairs are only
 * displayed once, i.e. (A,B) is the same as (B,A). */

void graphFree (Graph *);
/* Deallocates memory used by the Graph */

#endif


