\subsection{Defining Graphs}

\subsubsection{Graph Creation and Copying}\index{graph creation}
\index{graph copying}

Graphs of all of the various types supported by LINK can be created from
the GUI.  LINK's main window has an option called {\em Graph Windows}
explicitly for this purpose.  Graph types are selected by proceding 
through the cascading menus associated with that option.  The user's
selections provide answers to the three questions listed below, then 
a window containing a graph of the appropriate type appears.
\begin{itemize}
	\item graph or hypergraph?
	\item directed undirected, or mixed?
	\item multiple edges allowed or not?
\end{itemize}

It is also possible to redefine the graph associated with a graph view.
The {\em File} menu has the following menu options to change the graph
being viewed or bring up new graph views.

\begin{itemize}
	\item New	This option brings up the same cascade of menus
			used in creating graphs from the main window.
			The user selects a graph type, and a new empty
			graph of the appropriate type replaces the 
			the current graph (which is lost).
	\item {\em Generate}  It is often desirable to call algorithms 
			      which generate graphs rather than creating
			      graphs by hand.  The {\em Generate} menu
			      current supports the generation of cycles,
			      complete graphs, grids, and uniform hypergraphs,
			      but adding new generators is straightforward
			      (though as yet undocumented 7/19/96).
	\item {\em Clone}  Often one wants to compare a slight variation of
			   a graph $G$ with $G$ itself.  The {\em Clone}
			   option will bring up an exact copy of a graph,
			   which can then be modified without affecting the
			   original. 
	\item {\em Multi-Graph Clone}  
			   All graphs in LINK either allow multiple edges or
			   do not.  In certain cases, such a collapsing 
			   groups of vertices into subgraphs, it is 
			   necessary to allow multiple edges.  If such an
			   operation is needed for a simple graph, this
			   option will bring up a clone of the graph, except
			   of the corresponding type allowing multiple edges.
	\item {\em Simple Graph Clone}  
			   Similar to Multi-Graph Clone, except that the 
			   new copy of the graph is always a simple graph.
\end{itemize}


\subsection{Loading and Saving Graphs} \index{Graphs!Loading}
\index{Graphs!Saving}

The {\em Load} and {\em Save} options of the graph menu accomplish these
functions.  Graphs may be expressed in the input graph language with or 
without their attributes, so saved graphs,  when reloaded, retain the
same vertex location, color, etc.  The graph input language is described
in Appendix~\ref{sec:save-load}, but the simple examples follow:

\begin{itemize}
\item{\em Undirected Triangle}
\[ \lbrace [1 2 3] \lbrace \lbrace1 2\rbrace \lbrace1 3\rbrace \lbrace2 3\rbrace\rbrace\rbrace \]

\item{\em Directed Triangle}
\[ \lbrace [1 2 3] \lbrace<1 2> <1 3> <2 3>\rbrace\rbrace \]
\end{itemize}
