Class UndirectedJungNetwork<T>

All Implemented Interfaces:
Network<T>, Projection<T>

public class UndirectedJungNetwork<T> extends JungNetwork<T>
  • Constructor Details

    • UndirectedJungNetwork

      public UndirectedJungNetwork(String name)
    • UndirectedJungNetwork

      public UndirectedJungNetwork(String name, EdgeCreator<? extends RepastEdge<T>,T> creator)
  • Method Details

    • addEdge

      public RepastEdge<T> addEdge(RepastEdge<T> edge)
      Description copied from interface: Network
      Adds the specified edge to this Network. This will change the directionality of the edge to met that of the network.
      Specified by:
      addEdge in interface Network<T>
      Overrides:
      addEdge in class JungNetwork<T>
      Parameters:
      edge - the edge to add.
      Returns:
      the added edge.
    • addEdge

      public RepastEdge<T> addEdge(T source, T target, double weight)
      Description copied from interface: Network
      Adds an edge between the specified objects.
      Parameters:
      source - the source object
      target - the target object
      weight - weight of the new edge
      Returns:
      the created edge.
    • getDegree

      public int getDegree(T agent)
      Description copied from interface: Network
      Gets the degree of the node associated with the specified object.
      Specified by:
      getDegree in interface Network<T>
      Overrides:
      getDegree in class JungNetwork<T>
      Parameters:
      agent - the object whose node's degree we want.
      Returns:
      the degree of the node associated with the specified object.
    • getInDegree

      public int getInDegree(T agent)
      Description copied from interface: Network
      Gets the in degree of the node associated with the specified object.
      Specified by:
      getInDegree in interface Network<T>
      Overrides:
      getInDegree in class JungNetwork<T>
      Parameters:
      agent - the object whose node's in degree we want.
      Returns:
      the in degree of the node associated with the specified object.
    • getOutDegree

      public int getOutDegree(T agent)
      Description copied from interface: Network
      Gets the out degree of the node associated with the specified object.
      Specified by:
      getOutDegree in interface Network<T>
      Overrides:
      getOutDegree in class JungNetwork<T>
      Parameters:
      agent - the object whose node's out degree we want.
      Returns:
      the out degree of the node associated with the specified object.
    • isDirected

      public boolean isDirected()
      Returns:
      true if this Network is directed, otherwise false.