de.cesr.more.rs.building
Class MGeoRsWattsBetaSwBuilder<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>>

java.lang.Object
  extended by de.cesr.more.building.network.MNetworkService<AgentType,EdgeType>
      extended by de.cesr.more.rs.building.MRsNetworkService<AgentType,EdgeType>
          extended by de.cesr.more.rs.building.MGeoRsNetworkService<AgentType,EdgeType>
              extended by 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

Field Summary
protected  repast.simphony.context.Context<AgentType> context
           
protected  MoreEdgeFactory<AgentType,EdgeType> eFac
           
protected  MSmallWorldBetaModelNetworkGenerator<AgentType,EdgeType> gen
           
protected  String name
           
protected  MSmallWorldBetaModelNetworkGenerator.MSmallWorldBetaModelNetworkGeneratorParams<AgentType,EdgeType> params
           
protected  cern.jet.random.Uniform randomDist
           
 
Fields inherited from class de.cesr.more.rs.building.MGeoRsNetworkService
geoFactory, geography, geoRequestClass, pm
 
Fields inherited from class de.cesr.more.building.network.MNetworkService
edgeFac, edgeModifier
 
Constructor Summary
MGeoRsWattsBetaSwBuilder()
           
MGeoRsWattsBetaSwBuilder(MoreEdgeFactory<AgentType,EdgeType> eFac)
           
MGeoRsWattsBetaSwBuilder(MoreEdgeFactory<AgentType,EdgeType> eFac, String name)
           
 
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()
           
 
Methods inherited from class de.cesr.more.rs.building.MGeoRsNetworkService
getGeoRequestClass, logEdges, setGeography, setGeoRequestClass, shuffleCollection
 
Methods inherited from class de.cesr.more.building.network.MNetworkService
addAgents, checkAgentCollection, createEdge, getEdgeFactory, getEdgeModifier, logEdges, removeEdge, removeNode, setEdgeModifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.cesr.more.manipulate.network.MoreNetworkModifier
removeNode, setEdgeModifier
 
Methods inherited from interface de.cesr.more.manipulate.edge.MoreNetworkEdgeModifier
createEdge, getEdgeFactory, removeEdge
 

Field Detail

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
Constructor Detail

MGeoRsWattsBetaSwBuilder

public MGeoRsWattsBetaSwBuilder()

MGeoRsWattsBetaSwBuilder

public MGeoRsWattsBetaSwBuilder(MoreEdgeFactory<AgentType,EdgeType> eFac)
Parameters:
eFac -

MGeoRsWattsBetaSwBuilder

public MGeoRsWattsBetaSwBuilder(MoreEdgeFactory<AgentType,EdgeType> eFac,
                                String name)
Parameters:
eFac -
Method Detail

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:
  1. Selects a random node in the network
  2. Connects the new node to k of the selected node's predecessors (MNetworkBuildingPa.BUILD_WSSM_CONSIDER_SOURCES is false) or successors (otherwise)
  3. Rewires any newly created link with defined probability
  4. 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()