All Downloads are FREE. Search and download functionalities are using the official Maven repository.

prefuse.data.Edge Maven / Gradle / Ivy

Go to download

Prefuse is a set of software tools for creating rich interactive data visualizations in the Java programming language.

The newest version!
package prefuse.data;


/**
 * Tuple sub-interface that represents an edge in a graph structure. Each edge
 * has both a source node and a target node. For directed edges, this
 * distinction indicates the directionality of the edge. For undirected edges
 * this distinction merely reflects the underlying storage of the nodes.
 * 
 * @author jeffrey heer
 */
public interface Edge extends Tuple {

    /**
     * Returns the graph of which this Edge is a member.
     * @return the Graph containing this Edge
     */
    public Graph getGraph();
    
    /**
     * Indicates if this edge is directed or undirected.
     * @return true if directed, false if undirected.
     */
    public boolean isDirected();
    
    /**
     * Returns the first, or source, node upon which this Edge
     * is incident.
     * @return the source Node
     */
    public Node getSourceNode();
    
    /**
     * Returns the second, or target, node upon which this Edge
     * is incident.
     * @return the source Node
     */
    public Node getTargetNode();
    
    /**
     * Given a Node upon which this Edge is incident, the opposite incident
     * Node is returned. Throws an exception if the input node is not incident
     * on this Edge.
     * @param n a Node upon which this Edge is incident
     * @return the other Node touched by this Edge
     */
    public Node getAdjacentNode(Node n);
    
} // end of interface Edge




© 2015 - 2025 Weber Informatics LLC | Privacy Policy