A struct to arrange neurons on a 3D grid (a primitive cubic Bravais lattice with cubic side length 1)
More...
|
| Grid3D () |
|
| Grid3D (int _x) |
|
| Grid3D (int _x, float _distX, float _offsetX) |
|
| Grid3D (int _x, float _distX, float _offsetX, int _y, float _distY, float _offsetY) |
|
| Grid3D (int _x, float _distX, float _offsetX, int _y, float _distY, float _offsetY, int _z, float _distZ, float _offsetZ) |
|
| Grid3D (int _x, int _y) |
|
| Grid3D (int _x, int _y, int _z) |
|
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] | w | the width of the 3D grid (1st dim) |
[in] | h | the height of the 3D grid (2nd dim) |
[in] | z | the 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 490 of file carlsim_datastructures.h.