fpmas 1.6
Public Types | List of all members
fpmas::model::GridConfig< BuilderType, DistanceType, _CellType > Struct Template Reference

#include <grid.h>

Public Types

typedef BuilderType Builder
 
typedef DistanceType Distance
 
typedef _CellType CellType
 

Detailed Description

template<typename BuilderType, typename DistanceType, typename _CellType = model::GridCell>
struct fpmas::model::GridConfig< BuilderType, DistanceType, _CellType >

Generic static Grid configuration interface.

Member Typedef Documentation

◆ Builder

template<typename BuilderType , typename DistanceType , typename _CellType = model::GridCell>
typedef BuilderType fpmas::model::GridConfig< BuilderType, DistanceType, _CellType >::Builder

fpmas::api::model::CellNetworkBuilder implementation that can be used to build the grid.

◆ Distance

template<typename BuilderType , typename DistanceType , typename _CellType = model::GridCell>
typedef DistanceType fpmas::model::GridConfig< BuilderType, DistanceType, _CellType >::Distance

Function object that defines a function with the following signature:

\* integer type *\ operator()(const DiscretePoint& p1, const DiscretePoint& p2) const;

In practice, p1 and p2 corresponds to coordinates of Cells in the grid. The method must returned the length of the path from p1 to p2 within the Graph representing this Grid (that might have been built using the Builder).

Here is two examples:

  • if Grid cells are linked together using Von Neumann neighborhoods, the length of the path from p1 to p2 in the underlying Graph is the ManhattanDistance from p1 to p2.
  • if Grid cells are linked together using Moore neighborhoods, the length of the path from p1 to p2 in the underlying Graph is the ChebyshevDistance from p1 to p2.

◆ CellType

template<typename BuilderType , typename DistanceType , typename _CellType = model::GridCell>
typedef _CellType fpmas::model::GridConfig< BuilderType, DistanceType, _CellType >::CellType

Type of fpmas::api::model::Cell used by the Grid.

This type is notably used to define Range types of GridAgent evolving on the Grid.


The documentation for this struct was generated from the following file: