Interface NetworkFactory
- All Known Implementing Classes:
DefaultNetworkFactory
public interface NetworkFactory
-
Method Summary
Modifier and TypeMethodDescription<T> Network<T>
createNetwork
(String netName, Context<T> context, boolean isDirected) Creates a Network that will contain the specified class of objects.<T> Network<T>
createNetwork
(String netName, Context<T> context, boolean isDirected, NetworkGenerator<T> generator, EdgeCreator<? extends RepastEdge<T>, T> edgeCreator) Creates a Network that will contain the specified class of objects.<T> Network<T>
createNetwork
(String netName, Context<T> context, boolean isDirected, EdgeCreator<? extends RepastEdge<T>, T> edgeCreator) Creates a Network that will contain the specified class of objects.<T> Network<T>
createNetwork
(String netName, Context<T> context, NetworkGenerator<T> generator, boolean isDirected) Creates a Network that will contain the specified class of objects.
-
Method Details
-
createNetwork
Creates a Network that will contain the specified class of objects. Any objects in the context will be added as nodes in the returned Network, but any edges created are local to the network itself. The network is added to the specified Context as a projection and can be retrieved from the Context withContext.getProjection(networkName)
. If a network with the specified name has already been created, that already created network will be returned.- Parameters:
netName
- the name of the networkcontext
- the context of which the network will be a projectionisDirected
- whether or not the network should be directed- Returns:
- the created network.
-
createNetwork
<T> Network<T> createNetwork(String netName, Context<T> context, NetworkGenerator<T> generator, boolean isDirected) Creates a Network that will contain the specified class of objects. Any objects in the context will be added as nodes in the returned Network, but any edges created are local to the network itself. The network is added to the specified Context as a projection and can be retrieved from the Context withContext.getProjection(networkName)
. If a network with the specified name has already been created, that already created network will be returned.- Parameters:
netName
- the name of the networkcontext
- the context of which the network will be a projectiongenerator
- a generator used to create the initial network topology. Note that there must be enough objects in the context to create the topologyisDirected
- whether or not the network should be directed- Returns:
- the created network.
-
createNetwork
<T> Network<T> createNetwork(String netName, Context<T> context, boolean isDirected, EdgeCreator<? extends RepastEdge<T>, T> edgeCreator) Creates a Network that will contain the specified class of objects. Any objects in the context will be added as nodes in the returned Network, but any edges created are local to the network itself. The network is added to the specified Context as a projection and can be retrieved from the Context withContext.getProjection(networkName)
. If a network with the specified name has already been created, that already created network will be returned.- Parameters:
netName
- the name of the networkcontext
- the context of which the network will be a projectionisDirected
- whether or not the network should be directededgeCreator
- the class used to create edges for this network- Returns:
- the created network.
-
createNetwork
<T> Network<T> createNetwork(String netName, Context<T> context, boolean isDirected, NetworkGenerator<T> generator, EdgeCreator<? extends RepastEdge<T>, T> edgeCreator) Creates a Network that will contain the specified class of objects. Any objects in the context will be added as nodes in the returned Network, but any edges created are local to the network itself. The network is added to the specified Context as a projection and can be retrieved from the Context withContext.getProjection(networkName)
. If a network with the specified name has already been created, that already created network will be returned.- Parameters:
netName
- the name of the networkcontext
- the context of which the network will be a projectionisDirected
- whether or not the network should be directedgenerator
- used to create the initial network topology. Note that there must be enough objects in the context to create the topologyedgeCreator
- the class used to create edges for this network- Returns:
- the created network.
-