Class DefaultEdgeCreator<T>

java.lang.Object
repast.simphony.space.graph.DefaultEdgeCreator<T>
All Implemented Interfaces:
EdgeCreator<RepastEdge<T>,T>

public class DefaultEdgeCreator<T> extends Object implements EdgeCreator<RepastEdge<T>,T>
Default implementation of EdgeCreator that return RepastEdge.
Author:
Nick Collier
  • Constructor Details

    • DefaultEdgeCreator

      public DefaultEdgeCreator()
  • Method Details

    • createEdge

      public RepastEdge<T> createEdge(T source, T target, boolean isDirected, double weight)
      Creates an Edge with the specified source, target, direction and weight.
      Specified by:
      createEdge in interface EdgeCreator<RepastEdge<T>,T>
      Parameters:
      source - the edge source
      target - the edge target
      isDirected - whether or not the edge is directed
      weight - the weight of the edge
      Returns:
      the created edge.
    • getEdgeType

      public Class<RepastEdge> getEdgeType()
      Gets the edge type produced by this EdgeCreator.
      Specified by:
      getEdgeType in interface EdgeCreator<RepastEdge<T>,T>
      Returns:
      the edge type produced by this EdgeCreator.