<html>
    <head>
        <title>A GPL Package</title>
        <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
        <table fstname="mainlayout" width="100%">
            <tr>
                <td>
                    <table fstname="mTitle" width="100%">
                        <tr>
                            <td WIDTH="10%">
                                <img border="0" alt="FOP" src="images/FopButton3.jpg" width="80" height="64" />
                            </td>
                            <td WIDTH="90%" class="GPL_TITLE">
                                A GPL Package
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr fstname="mainlayout1">
                <td fstname="mainlayout2">
                    <table fstname="mIntroduction">
                        <tr>
                            <td>
                                <div class="GPL_TEXT">A <b>Graph Product Line (GPL)</b> package is a customized set of graph algorithms written in the Java language. This particular package implements a <span id="mWeighted" />, <span id="mDirected" /> graph with the following algorithms:</div>
                            </td>
                        </tr>
                        <tr fstname="mIntroduction1">
                            <td fstname="mIntroduction2">
                                <ul fstname="mListAlgo"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="GPL_TEXT">Click on the above algorithm names for more detail about them and how to invoke them. This document also contains sections on the following topics:</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <ul id="mMenu">
                                    <li>
                                        <span class="GPL_TEXT">
                                            <a href="#Programmatic Invocation">Programmatic Invocation</a>
                                        </span>
                                    </li>
                                    <li>
                                        <span class="GPL_TEXT">
                                            <a href="#Algorithm Descriptions">Algorithm Descriptions</a>
                                        </span>
                                    </li>
                                    <li>
                                        <span class="GPL_TEXT">
                                            <a href="#Implementation Notes">Implementation Notes</a>
                                        </span>
                                    </li>
                                </ul>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <table id="mProgInvo">
                        <tr>
                            <td class="GPL_TITLE2">
                                <a name="Programmatic Invocation">Programmatic Invocation</a>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="GPL_TEXT">The following code snippet illustrates how a graph object is defined. First a Graph object is created. Then each vertex is created, and then each edge is added with its corresponding weight. Note in the code below that edge information has already been created in a set of arrays (startVertices, endVertices, weights); you can substitute your own code for this. Similarly, Vertex objects need not have manufactured names.</span>
<br/>
                            </td>
                        </tr>
                        <tr>
                            <td>
<span class="GPL_CODE">Graph g = new Graph();</span><br/>
<span class="GPL_CODE">Vertex V[] = new Vertex[num_vertices];</span><br/>
<span class="GPL_CODE"> for ( i=0; i!=m_vertices; i++ )</span><br/>
<span class="GPL_CODE"><font color="#FFFFFF">aa</font>V[i] = new Vertex().assignName(v + i);</span><br/>
<span class="GPL_CODE">for ( i=0; i!=num_edges; i++ )</span><br/>
<span class="GPL_CODE">{</span><br/>
<span class="GPL_CODE"><font color="#FFFFFF">  </font>Vertex v1 = ( Vertex ) V[ startVertices[ i ] ];</span><br/>
<span class="GPL_CODE"><font color="#FFFFFF">  </font>Vertex v2 = ( Vertex ) V[ endVertices[ i ] ];</span><br/>
<span class="GPL_CODE"><font color="#FFFFFF">  </font>EdgeIfc edge = g.addEdge( v1, v2 );</span><br/>
<span class="GPL_CODE"><font color="#FFFFFF">  </font>edge.setWeight( weights[ i ] );</span><br/>
<span class="GPL_CODE">}</span><br/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="GPL_TEXT">
<br/>Once a graph object is created, you can invoke a graph algorithm. Let algName be the name of an algorithm (look below to find the exact name and parameter list). A typical invocation looks like:</span>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <blockquote>
                        <div class="GPL_CODE">g.algName();
                    </div>
                    </blockquote>
                </td>
            </tr>
            <tr fstname="mainlayout3">
                <td fstname="mainlayout4">
                    <table fstname="mAlgoDesc">
                        <tr>
                            <td class="GPL_TITLE2">
                                <a name="Algorithm Descriptions">Algorithm Descriptions</a>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div class="GPL_TEXT">Let G denote a Graph object and V denote a Vertex object.</div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
          </table>
		<hr/>
        <p><font face="Arial"><b>Copyright AHEAD / Onekin Research Group. All rights reserved.</b><br/>
              <b>Revised: March 17th, 2006</b></font></p>
         <p><b><font face="Arial">Report questions/problems: <a href="mailto:batory@cs.utexas.edu">Don Batory</a> | <a href="mailto:struji@ehu.es">Salva Trujillo</a></font></b>
        </p>
    </body>
</html>
