CellularAutomata
Loading...
Searching...
No Matches
CellularAutomata::States Namespace Reference

Commonly used state initializations. More...

Namespaces

namespace  Objects
 Some predefined objects of Conway's Game of Life.
 

Functions

template<typename T >
void normal (T *array, const unsigned int h, const unsigned int w)
 Fills the kernel with values between [0, 1].
 
template<typename T >
void binary (T *array, const unsigned int h, const unsigned int w)
 Fills the kernel with either 0 or 1.
 

Detailed Description

Commonly used state initializations.

Function Documentation

◆ binary()

template<typename T >
void CellularAutomata::States::binary ( T *  array,
const unsigned int  h,
const unsigned int  w 
)

Fills the kernel with either 0 or 1.

Template Parameters
Ttype
Parameters
arraycurrent state array
hstate height
wstate width

◆ normal()

template<typename T >
void CellularAutomata::States::normal ( T *  array,
const unsigned int  h,
const unsigned int  w 
)

Fills the kernel with values between [0, 1].

Template Parameters
Ttype
Parameters
arraycurrent state array
hstate height
wstate width