CARLsim  6.1.0
CARLsim: a GPU-accelerated SNN simulator
Grid3D Struct Reference

A struct to arrange neurons on a 3D grid (a primitive cubic Bravais lattice with cubic side length 1) More...

#include <carlsim_datastructures.h>

Public Member Functions

 Grid3D ()
 
 Grid3D (int _x)
 
 Grid3D (int _x, float _distX, float _offsetX)
 
 Grid3D (int _x, int _y)
 
 Grid3D (int _x, float _distX, float _offsetX, int _y, float _distY, float _offsetY)
 
 Grid3D (int _x, int _y, int _z)
 
 Grid3D (int _x, float _distX, float _offsetX, int _y, float _distY, float _offsetY, int _z, float _distZ, float _offsetZ)
 

Public Attributes

float distX
 
float distY
 
float distZ
 
int N
 
int numX
 
int numY
 
int numZ
 
float offsetX
 
float offsetY
 
float offsetZ
 

Friends

std::ostream & operator<< (std::ostream &strm, const Grid3D &g)
 

Detailed Description

Neurons of a group can be arranged topographically, so that they virtually lie on a 3D grid. Connections can then be specified depending on the relative placement of neurons via CARLsim::connect. This allows for the creation of networks with complex spatial structure.

Each neuron in the group gets assigned a (x,y,z) location on a 3D grid centered around the origin, so that calling Grid3D(Nx,Ny,Nz) creates coordinates that fall in the range [-(Nx-1)/2, (Nx-1)/2], [-(Ny-1)/2, (Ny-1)/2], and [-(Nz-1)/2, (Nz-1)/2]. The resulting grid is a primitive cubic Bravais lattice with cubic side length 1 (arbitrary units). The primitive (or simple) cubic crystal system consists of one lattice point (neuron) on each corner of the cube. Each neuron at a lattice point is then shared equally between eight adjacent cubes.

Parameters
[in]wthe width of the 3D grid (1st dim)
[in]hthe height of the 3D grid (2nd dim)
[in]zthe depth of the 3D grid (3rd dim; also called column or channel) Examples:
  • Grid3D(1,1,1) will create a single neuron with location (0,0,0).
  • Grid3D(2,1,1) will create two neurons, where the first neuron (ID 0) has location (-0.5,0,0), and the second neuron (ID 1) has location (0.5,0,0).
  • Grid3D(1,1,2) will create two neurons, where the first neuron (ID 0) has location (0,0,-0.5), and the second neuron (ID 1) has location (0,0,0.5).
  • Grid3D(2,2,2) will create eight neurons, where the first neuron (ID 0) has location (-0.5,-0.5,-0.5), the second neuron has location (0.5,-0.5,-0.5), the third has (-0.5,0.5,-0.5), and so forth (see figure below).
  • Grid3D(3,3,3) will create 3x3x3=27 neurons, where the first neuron (ID 0) has location (-1,-1,-1), the second neuron has location (0,-1,-1), the third has (1,-1,-1), the fourth has (-1,0,-1), ..., and the last one has (1,1,1).
  • etc.

Members: x, width the width of the 3D grid (1st dim) y, height the height of the 3D grid (2nd dim) z, depth, columns, channels the depth of the 3D grid (3rd dim) N the total number of neurons on the grid, N=x*y*z

Definition at line 634 of file carlsim_datastructures.h.

Constructor & Destructor Documentation

◆ Grid3D() [1/7]

Grid3D ( )
inline

Definition at line 635 of file carlsim_datastructures.h.

◆ Grid3D() [2/7]

Grid3D ( int  _x)
inline

Definition at line 640 of file carlsim_datastructures.h.

Here is the call graph for this function:

◆ Grid3D() [3/7]

Grid3D ( int  _x,
float  _distX,
float  _offsetX 
)
inline

Definition at line 646 of file carlsim_datastructures.h.

Here is the call graph for this function:

◆ Grid3D() [4/7]

Grid3D ( int  _x,
int  _y 
)
inline

Definition at line 653 of file carlsim_datastructures.h.

Here is the call graph for this function:

◆ Grid3D() [5/7]

Grid3D ( int  _x,
float  _distX,
float  _offsetX,
int  _y,
float  _distY,
float  _offsetY 
)
inline

Definition at line 660 of file carlsim_datastructures.h.

Here is the call graph for this function:

◆ Grid3D() [6/7]

Grid3D ( int  _x,
int  _y,
int  _z 
)
inline

Definition at line 669 of file carlsim_datastructures.h.

Here is the call graph for this function:

◆ Grid3D() [7/7]

Grid3D ( int  _x,
float  _distX,
float  _offsetX,
int  _y,
float  _distY,
float  _offsetY,
int  _z,
float  _distZ,
float  _offsetZ 
)
inline

Definition at line 676 of file carlsim_datastructures.h.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  strm,
const Grid3D g 
)
friend

Definition at line 688 of file carlsim_datastructures.h.

Member Data Documentation

◆ distX

float distX

Definition at line 693 of file carlsim_datastructures.h.

◆ distY

float distY

Definition at line 693 of file carlsim_datastructures.h.

◆ distZ

float distZ

Definition at line 693 of file carlsim_datastructures.h.

◆ N

int N

Definition at line 695 of file carlsim_datastructures.h.

◆ numX

int numX

Definition at line 692 of file carlsim_datastructures.h.

◆ numY

int numY

Definition at line 692 of file carlsim_datastructures.h.

◆ numZ

int numZ

Definition at line 692 of file carlsim_datastructures.h.

◆ offsetX

float offsetX

Definition at line 694 of file carlsim_datastructures.h.

◆ offsetY

float offsetY

Definition at line 694 of file carlsim_datastructures.h.

◆ offsetZ

float offsetZ

Definition at line 694 of file carlsim_datastructures.h.


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