<Chapter Label="Visualising and IO"><Heading>Visualising and IO</Heading>

  <Section><Heading>Visualising a digraph</Heading>
    <#Include Label="Splash">
    <#Include Label="DotDigraph">
    <#Include Label="DotSymmetricDigraph">
    <#Include Label="DotPartialOrderDigraph">
    <#Include Label="DotPreorderDigraph">
    <#Include Label="DotHighlightedDigraph">
  </Section>

  <Section><Heading>Reading and writing digraphs to a file</Heading>
    This section describes different ways to store and read graphs
    from a file in the &Digraphs; package.
    <List>
      <Mark> Graph6 </Mark>
      <Item>
	<E> Graph6 </E> is a graph data format for storing undirected graphs
	with no multiple edges nor loops of size up to <M> 2^{36} - 1 </M> in
	printable chracters. The format consists of two parts. The first part
	uses one to eight bytes to store the number of vertices. And the second
	part is the upper half of the adjacency matrix converted into ASCII
	characters. For a more detail description see <URL Text='Graph6'>
	http://cs.anu.edu.au/~bdm/data/formats.txt</URL>.
      </Item>

      <Mark> Sparse6 </Mark>
      <Item>
	<E> Sparse6 </E> is a graph data format for storing undirected graphs
	with possibly multiple edges or loops. The maximal number of vertices
	allowed is <M> 2^{36} - 1 </M>. The format consists of two parts. The
	first part uses one to eight bytes to store the number of vertices.
	And the second part only stores information about the edges.
	Therefore, the <E> Sparse6 </E> format return a more compact encoding
	then <E> Graph6 </E> for sparse graph, i.e.  graphs where the number
	of edges is much less than the number of vertices squared.  For a more
	detail description see <URL Text='Sparse6'>
        http://cs.anu.edu.au/~bdm/data/formats.txt</URL>.
      </Item>

      <Mark> Digraph6 </Mark>
      <Item>
	<E>Digraph6</E> is a new format based on <E> Graph6 </E>, but designed
	for digraphs. The entire adjacency matrix is stored, and
	therefore there is support for directed edges and single-vertex loops.
	However, multiple edges are not supported.
      </Item>

      <Mark> DiSparse6 </Mark>
      <Item>
	<E>DiSparse6</E> is a new format based on <E> Sparse6 </E>, but
	designed for digraphs. In this format the list of edges is
	partitioned into inceasing and decreasing edges, depending whether the
	edge has its source bigger than the range. Then both sets of edges are
	written separetly in <E> Sparse6 </E> format with a separation symbol
	in between.
      </Item>
    </List>
    <#Include Label="String">
    <#Include Label="DigraphFromGraph6String">
    <#Include Label="Graph6String">
    <#Include Label="DigraphFile">
    <#Include Label="ReadDigraphs">
    <#Include Label="WriteDigraphs">
    <#Include Label="IteratorFromDigraphFile">
    <#Include Label="DigraphPlainTextLineEncoder">
    <#Include Label="TournamentLineDecoder">
    <#Include Label="AdjacencyMatrixUpperTriangleLineDecoder">
    <#Include Label="TCodeDecoder">
    <#Include Label="PlainTextString">
    <#Include Label="WritePlainTextDigraph">
    <#Include Label="WriteDIMACSDigraph">
  </Section>
</Chapter>
