RepastHPC  2.3.1
Public Member Functions | List of all members
repast::relogo::WorldCreator Class Reference

Creates a the relogo world given some parameters. More...

#include <WorldCreator.h>

Public Member Functions

 WorldCreator (boost::mpi::communicator *communicator)
 
template<typename ObsType , typename PatchType , typename PatchCreator >
ObsType * createWorld (const WorldDefinition &worldDef, const std::vector< int > &pConfig, PatchCreator &patchCreator)
 Creates the Relogo world using the specified parameters and returns an Observer of ObsType. More...
 
template<typename ObsType , typename PatchType >
ObsType * createWorld (const WorldDefinition &worldDef, const std::vector< int > &pConfig)
 Creates an observer of the specified type. More...
 

Detailed Description

Creates a the relogo world given some parameters.

Member Function Documentation

◆ createWorld() [1/2]

template<typename ObsType , typename PatchType >
ObsType * repast::relogo::WorldCreator::createWorld ( const WorldDefinition worldDef,
const std::vector< int > &  pConfig 
)

Creates an observer of the specified type.

The observer will contain a world defined by worldDef and pConfig.

Parameters
worldDefthe world definition
pConfiga 2D vector containing the number of processes per grid dimension
Template Parameters
ObsTypethe type of Observer to create. This must extend Observer.
PatchTypethe type of Patches to create. This must either be or extend Patch.

◆ createWorld() [2/2]

template<typename ObsType , typename PatchType , typename PatchCreator >
ObsType * repast::relogo::WorldCreator::createWorld ( const WorldDefinition worldDef,
const std::vector< int > &  pConfig,
PatchCreator &  patchCreator 
)

Creates the Relogo world using the specified parameters and returns an Observer of ObsType.

Parameters
worldDefthe world definition
pConfiga two element vector describing the number of processes along the x and y dimensions
patchCreatorused to create the Patches.
Template Parameters
ObsTypethe type of Observer to create. This must extend Observer.
PatchTypethe type of Patches to create. This must either be or extend Patch.
PatchCreatora function or functor with the following signature PatchType* (AgentId id, Observer* obs).

The documentation for this class was generated from the following files: