CellModules
Diffusion2D::PluginDiffusion< cell_t > Class Template Reference

grid diffusion based plugin class More...

#include <PluginDiffusion.hpp>

Public Member Functions

 PluginDiffusion ()
 constructor More...
 
 PluginDiffusion (int w, int h)
 constructor More...
 
 PluginDiffusion (int size)
 constructor More...
 
DiffusionGridgetDiffusionGrid ()
 grid getter More...
 
void addMolecule (int n, Molecule m)
 molecule adder More...
 
void initDiffusionGrid (int size)
 square grid initializer More...
 
void initDiffusionGrid (int w, int h)
 grid initializer More...
 
void setToreX (bool b)
 grid toreX setter More...
 
void setToreY (bool b)
 grid toreY setter More...
 
void setTore (bool x, bool y)
 grid tore setter More...
 
template<typename world_t >
void preBehaviorUpdate (world_t *w)
 preBehaviorUpdate MecaCell hook More...
 

Private Attributes

DiffusionGrid grid
 

Detailed Description

template<typename cell_t>
class Diffusion2D::PluginDiffusion< cell_t >

grid diffusion based plugin class

Template Parameters
cell_t

Definition at line 29 of file PluginDiffusion.hpp.

Constructor & Destructor Documentation

◆ PluginDiffusion() [1/3]

template<typename cell_t >
Diffusion2D::PluginDiffusion< cell_t >::PluginDiffusion ( )
inline

constructor

molecule grid

Definition at line 39 of file PluginDiffusion.hpp.

◆ PluginDiffusion() [2/3]

template<typename cell_t >
Diffusion2D::PluginDiffusion< cell_t >::PluginDiffusion ( int  w,
int  h 
)
inline

constructor

Parameters
w: the width of the grid
h: the height of the grid

Definition at line 47 of file PluginDiffusion.hpp.

◆ PluginDiffusion() [3/3]

template<typename cell_t >
Diffusion2D::PluginDiffusion< cell_t >::PluginDiffusion ( int  size)
inline

constructor

Parameters
size: the size of the square grid

Definition at line 56 of file PluginDiffusion.hpp.

Member Function Documentation

◆ addMolecule()

template<typename cell_t >
void Diffusion2D::PluginDiffusion< cell_t >::addMolecule ( int  n,
Molecule  m 
)
inline

molecule adder

Parameters
n: number of the molecule
m: new molecule to be added

Definition at line 72 of file PluginDiffusion.hpp.

◆ getDiffusionGrid()

template<typename cell_t >
DiffusionGrid * Diffusion2D::PluginDiffusion< cell_t >::getDiffusionGrid ( )
inline

grid getter

Returns
DiffusionGrid*

Definition at line 65 of file PluginDiffusion.hpp.

◆ initDiffusionGrid() [1/2]

template<typename cell_t >
void Diffusion2D::PluginDiffusion< cell_t >::initDiffusionGrid ( int  size)
inline

square grid initializer

Parameters
size

Definition at line 79 of file PluginDiffusion.hpp.

◆ initDiffusionGrid() [2/2]

template<typename cell_t >
void Diffusion2D::PluginDiffusion< cell_t >::initDiffusionGrid ( int  w,
int  h 
)
inline

grid initializer

Parameters
w: grid's width
h: grid's height

Definition at line 87 of file PluginDiffusion.hpp.

◆ preBehaviorUpdate()

template<typename cell_t >
template<typename world_t >
void Diffusion2D::PluginDiffusion< cell_t >::preBehaviorUpdate ( world_t *  w)
inline

preBehaviorUpdate MecaCell hook

computes and updates the molecule quantity for each cell

Template Parameters
world_t
Parameters
w

Definition at line 122 of file PluginDiffusion.hpp.

◆ setTore()

template<typename cell_t >
void Diffusion2D::PluginDiffusion< cell_t >::setTore ( bool  x,
bool  y 
)
inline

grid tore setter

Parameters
x: tore property on x-axis
y: tore property on y-axis

Definition at line 110 of file PluginDiffusion.hpp.

◆ setToreX()

template<typename cell_t >
void Diffusion2D::PluginDiffusion< cell_t >::setToreX ( bool  b)
inline

grid toreX setter

Parameters
b

Definition at line 94 of file PluginDiffusion.hpp.

◆ setToreY()

template<typename cell_t >
void Diffusion2D::PluginDiffusion< cell_t >::setToreY ( bool  b)
inline

grid toreY setter

Parameters
b

Definition at line 101 of file PluginDiffusion.hpp.

Member Data Documentation

◆ grid

template<typename cell_t >
DiffusionGrid Diffusion2D::PluginDiffusion< cell_t >::grid
private

Definition at line 32 of file PluginDiffusion.hpp.


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