Your IP : 216.73.216.48


Current Path : /usr/X11R6/share/apps/rocs/engineapi/
Upload File :
Current File : //usr/X11R6/share/apps/rocs/engineapi/GraphStructure.xml

<?xml version="1.0"?>
<object inherit="DataStructure">
<name>Graph Data Structure</name>
<id>GraphStructure</id>
<componentType>DataStructure</componentType>
<description>
<para>
A graph objects holds the information of a data structure of type "Graph".
</para>
</description>
<syntax>
</syntax>
<properties>
</properties>
<methods>
<method>
    <name>nodes()</name>
    <description>
        <para>Return list all nodes in the graph.</para>
    </description>
    <returnType>array</returnType>
    <parameters>
    </parameters>
</method>
<method>
    <name>nodes(type)</name>
    <description>
        <para>Return list all nodes in the graph of specified type.</para>
    </description>
    <returnType>array</returnType>
    <parameters>
    </parameters>
</method>
<method>
    <name>edges()</name>
    <description>
        <para>Return list all edges in the graph.</para>
    </description>
    <returnType>array</returnType>
    <parameters>
    </parameters>
</method>
<method>
    <name>edges(type)</name>
    <description>
        <para>Return list all edges in the graph of specified type.</para>
    </description>
    <returnType>array</returnType>
    <parameters>
        <parameter>
            <name>type</name>
            <type>int</type>
            <info>Identifier of a edge type.</info>
        </parameter>
    </parameters>
</method>
<method>
    <name>createNode(type)</name>
    <description>
        <para>Create a new node of the specified type and return the created node. If the type is not registered, no node is created.</para>
    </description>
    <returnType>GraphNode</returnType>
    <parameters>
        <parameter>
            <name>type</name>
            <type>int</type>
            <info>Identifier of a data type.</info>
        </parameter>
    </parameters>
</method>
<method>
    <name>createNode()</name>
    <description>
        <para>Create a new node of default type and return the created node.</para>
    </description>
    <returnType>GraphNode</returnType>
    <parameters>
    </parameters>
</method>
<method>
    <name>createEdge(from, to, type)</name>
    <description>
        <para>Create an edge from node "from" to node "to" of the specified type and return the created edge. If the type is not registered, no edge is created.</para>
    </description>
    <returnType>GraphEdge</returnType>
    <parameters>
        <parameter>
            <name>from</name>
            <type>GraphNode</type>
            <info>Source node for the edge.</info>
        </parameter>
        <parameter>
            <name>to</name>
            <type>GraphNode</type>
            <info>Target node for the edge.</info>
        </parameter>
        <parameter>
            <name>type</name>
            <type>int</type>
            <info>Identifier of a edge type.</info>
        </parameter>
    </parameters>
</method>
<method>
    <name>createEdge(from, to)</name>
    <description>
        <para>Create an edge from node "from" to node "to" of default type and return the created edge.</para>
    </description>
    <returnType>GraphEdge</returnType>
    <parameters>
        <parameter>
            <name>from</name>
            <type>GraphNode</type>
            <info>Source node for the edge.</info>
        </parameter>
        <parameter>
            <name>to</name>
            <type>GraphNode</type>
            <info>Target node for the edge.</info>
        </parameter>
    </parameters>
</method>
<method>
    <name>distances(from)</name>
    <description>
        <para>Returns an array of shortest path lengths from this node to every other node in the graph.</para>
    </description>
    <returnType>Array</returnType>
    <parameters>
        <parameter>
            <name>from</name>
            <type>GraphNode</type>
            <info>Source node for distance computations.</info>
        </parameter>
    </parameters>
</method>
</methods>
</object>