public class ErdosRenyiCommunicationGraph extends CommunicationGraph
SocialGraph.EDGEMEDIUM
edges, neighbours, nodes, outgoingEdges, outgoingEdgesMedium
associatedSimulationContainer
Constructor and Description |
---|
ErdosRenyiCommunicationGraph(SimulationContainer associatedSimulationContainer,
SNConfiguration sNConfiguration,
int numberOfNodes)
Constructor for the ErdosRenyiCommunicationGraph giving the number of nodes in the social graph
|
ErdosRenyiCommunicationGraph(SimulationContainer associatedSimulationContainer,
SNConfiguration sNConfiguration,
java.util.Set<SNNode> nodes)
Constructor for the ErdosRenyiCommunicationGraph giving the nodes in the social graph explicitly
|
ErdosRenyiCommunicationGraph(SimulationContainer associatedSimulationContainer,
SNConfiguration sNConfiguration,
java.util.Set<SNNode> nodes,
java.util.Set<SNEdge> edges,
java.util.HashMap<SNNode,java.util.Set<SNNode>> neighbours)
Constructor giving the parameter for the ErdosRenyiCommunicationGraph and the edges,
as well as neighbourhood relations explicitly
|
Modifier and Type | Method and Description |
---|---|
void |
addNodes(SNConfiguration sNconfiguration,
java.util.Set<SNNode> nodesToAdd)
(Network type specific) method to add a number of nodes (and the edges that go with them) to the social graph
|
protected java.util.Set<SNEdge> |
createEdges(SNConfiguration sNConfiguration,
java.util.Set<SNNode> initialNodes)
(Network type specific) method to generate edges between a set of initial nodes.
|
int |
getK() |
getCommunicationNeighbours, getCommunicationNeighbours
addEdge, addIsolatedNode, getAllMediaNeighbours, getEdges, getNeighbours, getNeighbours, getNeighbours, getNeighbours, getNodes, modifyEdgeMedium, modifyEdgeNodes, modifyEdgeSource, modifyEdgeTarget, removeEdge, replaceEdge, retrieveAllEdges, retrieveEdge
getAssociatedSimulationContainer
public ErdosRenyiCommunicationGraph(SimulationContainer associatedSimulationContainer, SNConfiguration sNConfiguration, java.util.Set<SNNode> nodes, java.util.Set<SNEdge> edges, java.util.HashMap<SNNode,java.util.Set<SNNode>> neighbours)
associatedSimulationContainer
- The container the social network is embedded insNConfiguration
- The configuration object of the social networknodes
- The nodes the graph containsedges
- The edges the graph containsneighbours
- The neighbourhood relationships of the graphpublic ErdosRenyiCommunicationGraph(SimulationContainer associatedSimulationContainer, SNConfiguration sNConfiguration, java.util.Set<SNNode> nodes)
associatedSimulationContainer
- The container the social network is embedded insNConfiguration
- The configuration object of the social network with the socialGraph parameter containing the parameter 'k'nodes
- The nodes the socialGraph is based uponpublic ErdosRenyiCommunicationGraph(SimulationContainer associatedSimulationContainer, SNConfiguration sNConfiguration, int numberOfNodes)
associatedSimulationContainer
- The container the social network is embedded insNConfiguration
- The configuration object of the social network with the socialGraph parameter containing the parameter 'k'numberOfNodes
- The nodes the socialGraph is based uponpublic void addNodes(SNConfiguration sNconfiguration, java.util.Set<SNNode> nodesToAdd) throws java.lang.IllegalArgumentException
SocialGraph
addNodes
in class SocialGraph
sNconfiguration
- The configuration the social graph is based onnodesToAdd
- The nodes to be added to the social graphjava.lang.IllegalArgumentException
protected java.util.Set<SNEdge> createEdges(SNConfiguration sNConfiguration, java.util.Set<SNNode> initialNodes) throws java.lang.IllegalArgumentException
SocialGraph
createEdges
in class SocialGraph
sNConfiguration
- The configuration of the social graph of interestinitialNodes
- The nodes the social graph should be initialized withjava.lang.IllegalArgumentException
- Will be thrown when the configuration is errornouspublic int getK()