Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 2fc07611b08d4a735fd34d5eb60d8e16 > files > 2117

ciao-1.10p8-3mdv2010.0.i586.rpm

<HTML>
<HEAD>
<!-- Created by texi2html 1.56k + clip patches and <A href="http://www.clip.dia.fi.upm.es/Software">lpdoc</A> from ciao.texi on 28 January 2007 -->

<LINK rel="stylesheet" href="ciao.css" type="text/css">
<TITLE>The Ciao Prolog System               - Graphs</TITLE>
</HEAD>
<BODY> 
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_168.html">previous</A>, <A HREF="ciao_170.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC698" HREF="ciao_toc.html#TOC698">Graphs</A></H1>
<P>
<A NAME="IDX7876"></A>


<P>
<STRONG>Author(s):</STRONG> Francisco Bueno.


<P>
<STRONG>Version:</STRONG> 1.10#7 (2006/4/26, 19:22:13 CEST)


<P>
<STRONG>Version of last change:</STRONG> 1.9#238 (2003/12/22, 18:25:58 CET)


<P>
This module implements utilities for work with graphs



<UL>
<LI><A HREF="ciao_169.html#SEC699">Usage and interface (graphs)</A>
<LI><A HREF="ciao_169.html#SEC700">Documentation on exports (graphs)</A>
<LI><A HREF="ciao_169.html#SEC701">Documentation on internals (graphs)</A>
</UL>



<H2><A NAME="SEC699" HREF="ciao_toc.html#TOC699">Usage and interface (<CODE>graphs</CODE>)</A></H2>

<div class="cartouche">

<UL>

<LI><STRONG>Library usage:</STRONG>

<CODE>:- use_module(library(graphs)).</CODE>

<LI><STRONG>Exports:</STRONG>


<UL>

<LI><EM>Predicates:</EM>

<A NAME="IDX7877"></A>
<CODE>dgraph_to_ugraph/2</CODE>, 
<A NAME="IDX7878"></A>
<CODE>dlgraph_to_lgraph/2</CODE>, 
<A NAME="IDX7879"></A>
<CODE>edges_to_ugraph/2</CODE>, 
<A NAME="IDX7880"></A>
<CODE>edges_to_lgraph/2</CODE>.

<LI><EM>Regular Types:</EM>

<A NAME="IDX7881"></A>
<CODE>dgraph/1</CODE>, 
<A NAME="IDX7882"></A>
<CODE>dlgraph/1</CODE>.

</UL>

<LI><STRONG>Other modules used:</STRONG>


<UL>

<LI><EM>System library modules:</EM>

<A NAME="IDX7883"></A>
<CODE>sort</CODE>, 
<A NAME="IDX7884"></A>
<CODE>graphs/ugraphs</CODE>, 
<A NAME="IDX7885"></A>
<CODE>graphs/lgraphs</CODE>.

</UL>

</UL>

</div class="cartouche">



<H2><A NAME="SEC700" HREF="ciao_toc.html#TOC700">Documentation on exports (<CODE>graphs</CODE>)</A></H2>
<P>
<A NAME="IDX7886"></A>
<A NAME="IDX7887"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>dgraph/1:</B>
<DD><A NAME="IDX7888"></A>


<P>
<CODE>dgraph(Graph)</CODE>


<P>
A directed graph is a term <CODE>graph(V,E)</CODE> where <CODE>V</CODE> is a list of vertices and <CODE>E</CODE> is a list of edges (none necessarily sorted). Edges are pairs of vertices which are directed, i.e., <CODE>(a,b)</CODE> represents <CODE>a-&#62;b</CODE>. Two vertices <CODE>a</CODE> and <CODE>b</CODE> are equal only if <CODE>a==b</CODE>.


<P>
<STRONG>Usage:</STRONG> <CODE>dgraph(Graph)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>Graph</CODE> is a directed graph.

</UL>

</DL>

<P>
<A NAME="IDX7889"></A>
<A NAME="IDX7890"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>dlgraph/1:</B>
<DD><A NAME="IDX7891"></A>


<P>
<CODE>dlgraph(Graph)</CODE>


<P>
A labeled directed graph is a directed graph where edges are triples of the form <CODE>(a,l,b)</CODE> where <CODE>l</CODE> is the label of the edge <CODE>(a,b)</CODE>.


<P>
<STRONG>Usage:</STRONG> <CODE>dlgraph(Graph)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>Graph</CODE> is a directed labeled graph.

</UL>

</DL>

<P>
<A NAME="IDX7892"></A>
<A NAME="IDX7893"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>dgraph_to_ugraph/2:</B>
<DD><A NAME="IDX7894"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>dgraph_to_ugraph(+Graph, -UGraph)</CODE>

<UL>
<LI><EM>Description:</EM> Converts <CODE>Graph</CODE> to <CODE>UGraph</CODE>.

<LI><EM>The following properties should hold at call time:</EM>

<CODE>+Graph</CODE> is a directed graph.
 (<CODE>graphs:dgraph/1</CODE>)

<CODE>-UGraph</CODE> is a free variable.
 (<CODE>term_typing:var/1</CODE>)
<LI><EM>The following properties should hold upon exit:</EM>

<CODE>+Graph</CODE> is a directed graph.
 (<CODE>graphs:dgraph/1</CODE>)

<CODE>-UGraph</CODE> is an ugraph.
 (<CODE>ugraphs:ugraph/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX7895"></A>
<A NAME="IDX7896"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>dlgraph_to_lgraph/2:</B>
<DD><A NAME="IDX7897"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>dlgraph_to_lgraph(+Graph, -LGraph)</CODE>

<UL>
<LI><EM>Description:</EM> Converts <CODE>Edges</CODE> to <CODE>LGraph</CODE>.

<LI><EM>The following properties should hold at call time:</EM>

<CODE>+Graph</CODE> is a directed labeled graph.
 (<CODE>graphs:dlgraph/1</CODE>)

<CODE>-LGraph</CODE> is a free variable.
 (<CODE>term_typing:var/1</CODE>)
<LI><EM>The following properties should hold upon exit:</EM>

<CODE>+Graph</CODE> is a directed labeled graph.
 (<CODE>graphs:dlgraph/1</CODE>)

<CODE>-LGraph</CODE> is a labeled graph of <CODE>term</CODE> terms.
 (<CODE>lgraphs:lgraph/2</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX7898"></A>
<A NAME="IDX7899"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>edges_to_ugraph/2:</B>
<DD><A NAME="IDX7900"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>edges_to_ugraph(+Edges, -UGraph)</CODE>

<UL>
<LI><EM>Description:</EM> Converts <CODE>Graph</CODE> to <CODE>UGraph</CODE>.

<LI><EM>The following properties should hold at call time:</EM>

<CODE>+Edges</CODE> is a list of <CODE>pair</CODE>s.
 (<CODE>basic_props:list/2</CODE>)

<CODE>-UGraph</CODE> is a free variable.
 (<CODE>term_typing:var/1</CODE>)
<LI><EM>The following properties should hold upon exit:</EM>

<CODE>+Edges</CODE> is a list of <CODE>pair</CODE>s.
 (<CODE>basic_props:list/2</CODE>)

<CODE>-UGraph</CODE> is an ugraph.
 (<CODE>ugraphs:ugraph/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX7901"></A>
<A NAME="IDX7902"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>edges_to_lgraph/2:</B>
<DD><A NAME="IDX7903"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>edges_to_lgraph(+Edges, -LGraph)</CODE>

<UL>
<LI><EM>Description:</EM> Converts <CODE>Edges</CODE> to <CODE>LGraph</CODE>.

<LI><EM>The following properties should hold at call time:</EM>

<CODE>+Edges</CODE> is a list of <CODE>triple</CODE>s.
 (<CODE>basic_props:list/2</CODE>)

<CODE>-LGraph</CODE> is a free variable.
 (<CODE>term_typing:var/1</CODE>)
<LI><EM>The following properties should hold upon exit:</EM>

<CODE>+Edges</CODE> is a list of <CODE>triple</CODE>s.
 (<CODE>basic_props:list/2</CODE>)

<CODE>-LGraph</CODE> is a labeled graph of <CODE>term</CODE> terms.
 (<CODE>lgraphs:lgraph/2</CODE>)
</UL>

</DL>



<H2><A NAME="SEC701" HREF="ciao_toc.html#TOC701">Documentation on internals (<CODE>graphs</CODE>)</A></H2>
<P>
<A NAME="IDX7904"></A>
<A NAME="IDX7905"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>pair/1:</B>
<DD><A NAME="IDX7906"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>pair(P)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>P</CODE> is a pair <CODE>(_,_)</CODE>.

</UL>

</DL>

<P>
<A NAME="IDX7907"></A>
<A NAME="IDX7908"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>triple/1:</B>
<DD><A NAME="IDX7909"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>triple(P)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>P</CODE> is a triple <CODE>(_,_,_)</CODE>.

</UL>

</DL>

<P><HR><P>
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_168.html">previous</A>, <A HREF="ciao_170.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
</BODY>
</HTML>