Package repast.simphony.space.graph
Class UndirectedJungNetwork<T>
- java.lang.Object
-
- repast.simphony.space.projection.DefaultProjection<T>
-
- repast.simphony.space.graph.JungNetwork<T>
-
- repast.simphony.space.graph.UndirectedJungNetwork<T>
-
- All Implemented Interfaces:
Network<T>
,Projection<T>
public class UndirectedJungNetwork<T> extends JungNetwork<T>
-
-
Field Summary
-
Fields inherited from class repast.simphony.space.graph.JungNetwork
creator, graph
-
Fields inherited from class repast.simphony.space.projection.DefaultProjection
listeners, name
-
-
Constructor Summary
Constructors Constructor Description UndirectedJungNetwork(String name)
UndirectedJungNetwork(String name, EdgeCreator<? extends RepastEdge<T>,T> creator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepastEdge<T>
addEdge(RepastEdge<T> edge)
Adds the specified edge to this Network.RepastEdge<T>
addEdge(T source, T target, double weight)
Adds an edge between the specified objects.int
getDegree(T agent)
Gets the degree of the node associated with the specified object.int
getInDegree(T agent)
Gets the in degree of the node associated with the specified object.int
getOutDegree(T agent)
Gets the out degree of the node associated with the specified object.boolean
isDirected()
-
Methods inherited from class repast.simphony.space.graph.JungNetwork
addEdge, addEdge, addVertex, containsEdge, evaluate, getAdjacent, getDegree, getEdge, getEdgeCreator, getEdges, getEdges, getGraph, getInEdges, getNodes, getOutEdges, getPredecessors, getRandomAdjacent, getRandomPredecessor, getRandomSuccessor, getSuccessors, isAdjacent, isPredecessor, isSuccessor, numEdges, removeEdge, removeEdges, removeVertex, setGraph, size
-
Methods inherited from class repast.simphony.space.projection.DefaultProjection
addProjectionListener, fireProjectionEvent, getName, getProjectionListeners, removeProjectionListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface repast.simphony.space.projection.Projection
addProjectionListener, getName, getProjectionListeners, removeProjectionListener
-
-
-
-
Constructor Detail
-
UndirectedJungNetwork
public UndirectedJungNetwork(String name)
-
UndirectedJungNetwork
public UndirectedJungNetwork(String name, EdgeCreator<? extends RepastEdge<T>,T> creator)
-
-
Method Detail
-
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.
-
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 objecttarget
- the target objectweight
- 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.
-
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 interfaceNetwork<T>
- Overrides:
getInDegree
in classJungNetwork<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 interfaceNetwork<T>
- Overrides:
getOutDegree
in classJungNetwork<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.
-
-