de.cesr.more.rs.building
Class MGeoRsWattsBetaSwBuilder<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>>
java.lang.Object
de.cesr.more.building.network.MNetworkService<AgentType,EdgeType>
de.cesr.more.rs.building.MRsNetworkService<AgentType,EdgeType>
de.cesr.more.rs.building.MGeoRsNetworkService<AgentType,EdgeType>
de.cesr.more.rs.building.MGeoRsWattsBetaSwBuilder<AgentType,EdgeType>
- All Implemented Interfaces:
- MoreNetworkBuilder<AgentType,EdgeType>, MoreNetworkService<AgentType,EdgeType>, MoreGeoNetworkBuilder<AgentType,EdgeType>, MoreGeoNetworkService<AgentType,EdgeType>, MoreNetworkEdgeModifier<AgentType,EdgeType>, MoreNetworkModifier<AgentType,EdgeType>, MoreGeoRsNetworkBuilder<AgentType,EdgeType>, MoreGeoRsNetworkService<AgentType,EdgeType>, MoreRsNetworkBuilder<AgentType,EdgeType>, MoreRsNetworkService<AgentType,EdgeType>
- Direct Known Subclasses:
- MGeoRsWattsBetaSwPartnerCheckingBuilder
public class MGeoRsWattsBetaSwBuilder<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>>
- extends MGeoRsNetworkService<AgentType,EdgeType>
MORe
TODO parameter description
- Date:
- 24.06.2011
Method Summary |
boolean |
addAndLinkNode(MoreNetwork<AgentType,EdgeType> network,
AgentType node)
TODO test
Links a new node to an existing Watts-Beta Small-World Network in the following way:
Selects a random node in the network
Connects the new node to k of the selected node's predecessors
(MNetworkBuildingPa.BUILD_WSSM_CONSIDER_SOURCES is false) or successors (otherwise)
Rewires any newly created link with defined probability
In case the selected node's in/out-degree is less than k because of meantime manipulations the difference is
made up by creating distant links to/from the new node
|
MoreRsNetwork<AgentType,EdgeType> |
buildNetwork(Collection<AgentType> agents)
Links the given collection of agents and thus generates the network. |
cern.jet.random.Uniform |
getRandomDist()
|
void |
setContext(repast.simphony.context.Context<AgentType> context)
Set the (root) context the network shall span |
void |
setRandomDist(cern.jet.random.Uniform randomDist)
Sets the random distribution for this network builder (uniform) |
String |
toString()
|
context
protected repast.simphony.context.Context<AgentType extends MoreMilieuAgent> context
eFac
protected MoreEdgeFactory<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>> eFac
randomDist
protected cern.jet.random.Uniform randomDist
name
protected String name
params
protected MSmallWorldBetaModelNetworkGenerator.MSmallWorldBetaModelNetworkGeneratorParams<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>> params
gen
protected MSmallWorldBetaModelNetworkGenerator<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>> gen
MGeoRsWattsBetaSwBuilder
public MGeoRsWattsBetaSwBuilder()
MGeoRsWattsBetaSwBuilder
public MGeoRsWattsBetaSwBuilder(MoreEdgeFactory<AgentType,EdgeType> eFac)
- Parameters:
eFac
-
MGeoRsWattsBetaSwBuilder
public MGeoRsWattsBetaSwBuilder(MoreEdgeFactory<AgentType,EdgeType> eFac,
String name)
- Parameters:
eFac
-
setContext
public void setContext(repast.simphony.context.Context<AgentType> context)
- Description copied from class:
MGeoRsNetworkService
- Set the (root) context the network shall span
- Specified by:
setContext
in interface MoreRsNetworkBuilder<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>>
- Overrides:
setContext
in class MGeoRsNetworkService<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>>
- See Also:
MoreRsNetworkBuilder.setContext(repast.simphony.context.Context)
buildNetwork
public MoreRsNetwork<AgentType,EdgeType> buildNetwork(Collection<AgentType> agents)
- Description copied from interface:
MoreNetworkBuilder
- Links the given collection of agents and thus generates the network.
- Returns:
- network
- See Also:
Parameters are assigned
through the parameter framework to allow network builders to be initialised automatically.
addAndLinkNode
public boolean addAndLinkNode(MoreNetwork<AgentType,EdgeType> network,
AgentType node)
- TODO test
Links a new node to an existing Watts-Beta Small-World Network in the following way:
- Selects a random node in the network
- Connects the new node to k of the selected node's predecessors
(MNetworkBuildingPa.BUILD_WSSM_CONSIDER_SOURCES is false) or successors (otherwise)
- Rewires any newly created link with defined probability
- In case the selected node's in/out-degree is less than k because of meantime manipulations the difference is
made up by creating distant links to/from the new node
- Parameters:
network
- the network to remove the given agent from
- Returns:
- true if the agent could be completely removed
- See Also:
MoreNetworkModifier.addAndLinkNode(de.cesr.more.basic.network.MoreNetwork,
java.lang.Object)
getRandomDist
public cern.jet.random.Uniform getRandomDist()
- Returns:
- random distribution
setRandomDist
public void setRandomDist(cern.jet.random.Uniform randomDist)
- Sets the random distribution for this network builder (uniform)
- Parameters:
randomDist
-
toString
public String toString()
- Overrides:
toString
in class Object
- See Also:
Object.toString()