Class DefaultGraphEdge

java.lang.Object
All Implemented Interfaces:
WeightedGraphEdge, InterfaceObject, NamedObject, TreeObject, CleanableObject, XMLObject
Direct Known Subclasses:
NeuralNetConnection

public class DefaultGraphEdge
extends AbstractGraphEdge
implements WeightedGraphEdge
Default implementation of a Graph edge. Allows an edge weight to be specified.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Details

    • weight

      protected double weight
  • Constructor Details

  • Method Details

    • getWeight

      public double getWeight()
      Specified by:
      getWeight in interface WeightedGraphEdge
    • clone

      public java.lang.Object clone()
      Overrides:
      clone in class AbstractGraphEdge
    • setWeight

      public void setWeight​(double weight)
      Specified by:
      setWeight in interface WeightedGraphEdge
    • getLabel

      public java.lang.String getLabel()
      Overrides:
      getLabel in class AbstractGraphEdge
    • getFactory

      public org.apache.commons.collections15.Factory<AbstractGraphEdge> getFactory()
    • handleXMLElementStart

      public void handleXMLElementStart​(java.lang.String localName, org.xml.sax.Attributes attributes, XMLObject.XMLType type) throws org.xml.sax.SAXException
      Description copied from interface: XMLObject
      Handles the start of an XML element.
      Specified by:
      handleXMLElementStart in interface XMLObject
      Overrides:
      handleXMLElementStart in class AbstractGraphEdge
      Parameters:
      localName - Local name of the element
      attributes - Set of element attributes
      type - The XMLType of this element
      Throws:
      org.xml.sax.SAXException
    • getXML

      public java.lang.String getXML​(int tab, int v_from, int v_to)
      Description copied from class: AbstractGraphEdge
      Returns an XML representation for this edge given from and to indices.
      Overrides:
      getXML in class AbstractGraphEdge
      Returns:
    • getWeightTransformer

      public static org.apache.commons.collections15.Transformer<AbstractGraphEdge,​java.lang.Double> getWeightTransformer()