public class GilbertCommunicationGraph extends CommunicationGraph
SocialGraph.EDGEMEDIUM
edges, neighbours, nodes, outgoingEdges, outgoingEdgesMedium
associatedSimulationContainer
Constructor and Description |
---|
GilbertCommunicationGraph(SimulationContainer associatedSimulationContainer,
SNConfiguration sNConfiguration,
int numberOfNodes)
Constructor for the GilbertCommunicationGraph giving the number of nodes in the social graph explicitly
|
GilbertCommunicationGraph(SimulationContainer associatedSimulationContainer,
SNConfiguration sNConfiguration,
java.util.Set<SNNode> nodes)
Constructor for the GilbertCommunicationGraph giving the nodes in the social graph explicitly
|
GilbertCommunicationGraph(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 GilbertCommunicationGraph and the edges,
as well as neighbourhood relations explicitly
|
Modifier and Type | Method and Description |
---|---|
void |
addNodes(SNConfiguration sNConfiguration,
java.util.Set<SNNode> nodesToAdd)
Method to add a number of nodes to an existing graph.
|
java.util.Set<SNEdge> |
createEdges(SNConfiguration sNConfiguration,
java.util.Set<SNNode> initialNodes)
For creating the edges for a set of nodes, all possible communicative edges are iterated,
and for each edge it is decided whether it will be present or not
|
double |
getP() |
getCommunicationNeighbours, getCommunicationNeighbours
addEdge, addIsolatedNode, getAllMediaNeighbours, getEdges, getNeighbours, getNeighbours, getNeighbours, getNeighbours, getNodes, modifyEdgeMedium, modifyEdgeNodes, modifyEdgeSource, modifyEdgeTarget, removeEdge, replaceEdge, retrieveAllEdges, retrieveEdge
getAssociatedSimulationContainer
public GilbertCommunicationGraph(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 GilbertCommunicationGraph(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 'p'nodes
- The nodes the socialGraph is based uponpublic GilbertCommunicationGraph(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 'p'numberOfNodes
- The nodes the socialGraph is based uponpublic double getP()
public void addNodes(SNConfiguration sNConfiguration, java.util.Set<SNNode> nodesToAdd)
addNodes
in class SocialGraph
sNConfiguration
- The configuration the graph is based uponnodesToAdd
- The nodes to be added to the social graphpublic java.util.Set<SNEdge> createEdges(SNConfiguration sNConfiguration, java.util.Set<SNNode> initialNodes)
createEdges
in class SocialGraph
sNConfiguration
- The configuration of the social graph of interestinitialNodes
- The nodes the social graph should be initialized with