Documentation of 'medusa.graph.BasicEdge' Java class
BasicEdge
medusa.graph

Class BasicEdge

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    Edge, UniqueEdge


    public abstract class BasicEdge
    extends java.lang.Object
    implements java.io.Serializable
    Basic representation of an Edge as a connection between two nodes. Note that a node will only exist if there is an edge between them. This Graph representation is not based on nodes but edges.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      java.lang.String n1
      Node 1
      java.lang.String n2
      Node 2
    • Constructor Summary

      Constructors 
      Constructor and Description
      BasicEdge() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean contains(java.lang.String lbl)
      Checks if Node n is in the edge
      java.lang.String getFromName()
      Name of the first node
      java.lang.String[] getNodes()
      Node 1
      java.lang.String getToName()
      Name of the second node
      boolean oppositeName(java.lang.Object o)
      Check if edge if opposite to another edge, i.e if edge a contains nodes (n1,n2) and edge b contains (n2,n1)/
      java.lang.String report()
      Quick report of the two nodes
      boolean sameName(java.lang.Object o)
      Check if two edges have the same nodes
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • n1

        public java.lang.String n1
        Node 1
      • n2

        public java.lang.String n2
        Node 2
    • Constructor Detail

      • BasicEdge

        public BasicEdge()
    • Method Detail

      • getFromName

        public java.lang.String getFromName()
        Name of the first node
        Returns:
        String name
      • getToName

        public java.lang.String getToName()
        Name of the second node
        Returns:
        String name
      • report

        public java.lang.String report()
        Quick report of the two nodes
        Returns:
        String
      • sameName

        public boolean sameName(java.lang.Object o)
        Check if two edges have the same nodes
        Parameters:
        o - Object representation of BasicEdge
        Returns:
        True if same nodes occur in the two edges
      • contains

        public boolean contains(java.lang.String lbl)
        Checks if Node n is in the edge
        Parameters:
        lbl - label of node
        Returns:
        True if edge contains the label
      • oppositeName

        public boolean oppositeName(java.lang.Object o)
        Check if edge if opposite to another edge, i.e if edge a contains nodes (n1,n2) and edge b contains (n2,n1)/
        Parameters:
        o - BasicEdge cast as Object
        Returns:
        True if oppposites
      • getNodes

        public java.lang.String[] getNodes()
        Node 1
        Returns:

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.