Interface NetworkFactory

All Known Implementing Classes:
DefaultNetworkFactory

public interface NetworkFactory
  • Method Details

    • createNetwork

      <T> Network<T> createNetwork(String netName, Context<T> context, 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 with Context.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 network
      context - the context of which the network will be a projection
      isDirected - 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 with Context.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 network
      context - the context of which the network will be a projection
      generator - a generator used to create the initial network topology. Note that there must be enough objects in the context to create the topology
      isDirected - 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 with Context.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 network
      context - the context of which the network will be a projection
      isDirected - whether or not the network should be directed
      edgeCreator - 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 with Context.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 network
      context - the context of which the network will be a projection
      isDirected - whether or not the network should be directed
      generator - used to create the initial network topology. Note that there must be enough objects in the context to create the topology
      edgeCreator - the class used to create edges for this network
      Returns:
      the created network.