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

Defines a Relogo world. More...

#include <WorldDefinition.h>

Public Types

typedef std::vector< Projection< RelogoAgent > * >::const_iterator proj_iter
 An iterator over pointers to Projection<RelogoAgent>.
 

Public Member Functions

 WorldDefinition (int minX, int minY, int maxX, int maxY, bool wrapped, int buffer)
 Creates a world definition with the specified parameters. More...
 
void defineNetwork (std::string name, bool directed, RelogoLinkContentManager *rlcm)
 Defines a network with the specified name and whether or not the network is directed. More...
 
void defineNetwork (bool directed, RelogoLinkContentManager *rlcm)
 Defines the default network and whether or not the network is directed. More...
 
proj_iter networks_begin () const
 Gets the start of an iterator over the network Projections defined in this WorldDefinition. More...
 
proj_iter networks_end () const
 Gets the end of an iterator over the network Projections defined in this WorldDefinition. More...
 
int minX () const
 Gets the minimum x coordinate of the world. More...
 
int minY () const
 Gets the minimum y coordinate of the world. More...
 
int maxX () const
 Gets the maximum x coordinate of the world. More...
 
int maxY () const
 Gets the maximum y coordinate of the world. More...
 
const GridDimensions dimensions () const
 Gets the dimensions of the world expressed as a GridDimensions. More...
 
bool isWrapped () const
 Gets whether or not the world wraps. More...
 
int buffer () const
 Gets the size of the grid / space buffer. More...
 

Detailed Description

Defines a Relogo world.

Constructor & Destructor Documentation

◆ WorldDefinition()

repast::relogo::WorldDefinition::WorldDefinition ( int  minX,
int  minY,
int  maxX,
int  maxY,
bool  wrapped,
int  buffer 
)

Creates a world definition with the specified parameters.

These parameter will be applied when the world is created using a WorldCreator.

Parameters
minXthe minimum x coordinate of the world
minYthe minimum y coordinate of the world
maxXthe maximum x coordinate of the world
maxYthe maximum y coordinate of the world
wrappedwhether or not the space is periodic, wrapped as a torus
bufferthe size of the grid and space buffer between process grid and space representations

Member Function Documentation

◆ buffer()

int repast::relogo::WorldDefinition::buffer ( ) const
inline

Gets the size of the grid / space buffer.

Returns
the size of the grid / space buffer.

◆ defineNetwork() [1/2]

void repast::relogo::WorldDefinition::defineNetwork ( bool  directed,
RelogoLinkContentManager rlcm 
)

Defines the default network and whether or not the network is directed.

Any network related calls that don't specify a name will use this network. The network will use RelogoEdge-s by default

Parameters
directedif true, the network will be directed, otherwise it will be undirected

◆ defineNetwork() [2/2]

void repast::relogo::WorldDefinition::defineNetwork ( std::string  name,
bool  directed,
RelogoLinkContentManager rlcm 
)

Defines a network with the specified name and whether or not the network is directed.

The network will use the default RelogoEdge.

Parameters
namethe name of the network
directedif true, the network will be directed, otherwise it will be undirected

◆ dimensions()

const GridDimensions repast::relogo::WorldDefinition::dimensions ( ) const
inline

Gets the dimensions of the world expressed as a GridDimensions.

Returns
the dimensions of the world expressed as a GridDimensions.

◆ isWrapped()

bool repast::relogo::WorldDefinition::isWrapped ( ) const
inline

Gets whether or not the world wraps.

Returns
true if the world wraps, otherwise false.

◆ maxX()

int repast::relogo::WorldDefinition::maxX ( ) const
inline

Gets the maximum x coordinate of the world.

Returns
the maximum x coordinate of the world.

◆ maxY()

int repast::relogo::WorldDefinition::maxY ( ) const
inline

Gets the maximum y coordinate of the world.

Returns
the maximum y coordinate of the world.

◆ minX()

int repast::relogo::WorldDefinition::minX ( ) const
inline

Gets the minimum x coordinate of the world.

Returns
the minimum x coordinate of the world.

◆ minY()

int repast::relogo::WorldDefinition::minY ( ) const
inline

Gets the minimum y coordinate of the world.

Returns
the minimum y coordinate of the world.

◆ networks_begin()

proj_iter repast::relogo::WorldDefinition::networks_begin ( ) const
inline

Gets the start of an iterator over the network Projections defined in this WorldDefinition.

The iterator returns a pointer to a Projection<RelogoAgent>*.

◆ networks_end()

proj_iter repast::relogo::WorldDefinition::networks_end ( ) const
inline

Gets the end of an iterator over the network Projections defined in this WorldDefinition.

The iterator returns a pointer to a Projection<RelogoAgent>*.


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