de.cesr.more.rs.building
Class MRsLattice2DNetworkBuilder<AgentType,EdgeType extends MRepastEdge<AgentType>>
java.lang.Object
de.cesr.more.building.network.MLattice2DNetworkBuilder<AgentType,EdgeType>
de.cesr.more.rs.building.MRsLattice2DNetworkBuilder<AgentType,EdgeType>
- All Implemented Interfaces:
- MoreNetworkBuilder<AgentType,EdgeType>, MoreRsNetworkBuilder<AgentType,EdgeType>
- Direct Known Subclasses:
- MGeoRsLattice2DNetworkBuilder
public class MRsLattice2DNetworkBuilder<AgentType,EdgeType extends MRepastEdge<AgentType>>
- extends MLattice2DNetworkBuilder<AgentType,EdgeType>
- implements MoreRsNetworkBuilder<AgentType,EdgeType>
MORe
- Date:
- 14.05.2012
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
context
protected repast.simphony.context.Context<AgentType> context
MRsLattice2DNetworkBuilder
public MRsLattice2DNetworkBuilder()
MRsLattice2DNetworkBuilder
public MRsLattice2DNetworkBuilder(MoreEdgeFactory<AgentType,EdgeType> eFac,
String name)
setContext
public void setContext(repast.simphony.context.Context<AgentType> context)
- Description copied from interface:
MoreRsNetworkBuilder
- Set the context the resulting network is embedded within.
- Specified by:
setContext
in interface MoreRsNetworkBuilder<AgentType,EdgeType extends MRepastEdge<AgentType>>
- See Also:
MoreRsNetworkBuilder.setContext(repast.simphony.context.Context)
buildNetwork
public MoreRsNetwork<AgentType,EdgeType> buildNetwork(Collection<AgentType> agents)
- The order of elements in agents influences the lattice's characteristic.
So, make sure to shuffle the collection unless you require a special grid!
Furthermore in this regard, make sure the network underlying graph is an ordered one
(however, one that does not use HashMaps to store vertices), like
UndirectedOrderedSparseMultigraph (RS's UndirectedJungNetworks and DirectedJungNetwork
use such ordered graphs)!
- Specified by:
buildNetwork
in interface MoreNetworkBuilder<AgentType,EdgeType extends MRepastEdge<AgentType>>
- Specified by:
buildNetwork
in interface MoreRsNetworkBuilder<AgentType,EdgeType extends MRepastEdge<AgentType>>
- Overrides:
buildNetwork
in class MLattice2DNetworkBuilder<AgentType,EdgeType extends MRepastEdge<AgentType>>
- Returns:
- network
- See Also:
MoreRsNetworkBuilder.buildNetwork(java.util.Collection)