CARLsim  5.0.0
CARLsim: a GPU-accelerated SNN simulator
RadiusRF Struct Reference

A struct to specify the receptive field (RF) radius in 3 dimensions. More...

#include <carlsim_datastructures.h>

Public Member Functions

 RadiusRF ()
 
 RadiusRF (double rad)
 
 RadiusRF (double rad_x, double rad_y, double rad_z)
 

Public Attributes

double radX
 
double radY
 
double radZ
 

Friends

std::ostream & operator<< (std::ostream &strm, const RadiusRF &r)
 

Detailed Description

This struct can be used to specify the size of a receptive field (RF) radius in 3 dimensions x, y, and z. Receptive fields will be circular with radius as specified. The 3 dimensions follow the ones defined by Grid3D. If the radius in one dimension is 0, say x==0, then pre.x must be equal to post.x in order to be connected. If the radius in one dimension is -1, say x==-1, then pre and post will be connected no matter their x coordinate (effectively making an RF of infinite size). Otherwise, if the radius is a positive real number, the RF radius will be exactly this number. Call RadiusRF with only one argument to make that radius apply to all 3 dimensions.

Parameters
[in]rad_xthe RF radius in the x (first) dimension
[in]rad_ythe RF radius in the y (second) dimension
[in]rad_zthe RF radius in the z (third) dimension

Examples:

  • Create a 2D Gaussian RF of radius 10 in z-plane: RadiusRF(10, 10, 0) Neuron pre will be connected to neuron post iff (pre.x-post.x)^2 + (pre.y-post.y)^2 <= 100 and pre.z==post.z.
  • Create a 2D heterogeneous Gaussian RF (an ellipse) with semi-axes 10 and 5: RadiusRF(10, 5, 0) Neuron pre will be connected to neuron post iff (pre.x-post.x)/100 + (pre.y-post.y)^2/25 <= 1 and pre.z==post.z.
  • Connect all, no matter the RF (default): RadiusRF(-1, -1, -1)
  • Connect one-to-one: RadiusRF(0, 0, 0) Neuron pre will be connected to neuron post iff pre.x==post.x, pre.y==post.y, pre.z==post.z. Note: Use CARLsim::connect with type "one-to-one" instead.
Note
A receptive field is defined from the point of view of a post-neuron.

Definition at line 364 of file carlsim_datastructures.h.

Constructor & Destructor Documentation

◆ RadiusRF() [1/3]

RadiusRF ( )
inline

Definition at line 365 of file carlsim_datastructures.h.

◆ RadiusRF() [2/3]

RadiusRF ( double  rad)
inline

Definition at line 366 of file carlsim_datastructures.h.

◆ RadiusRF() [3/3]

RadiusRF ( double  rad_x,
double  rad_y,
double  rad_z 
)
inline

Definition at line 367 of file carlsim_datastructures.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  strm,
const RadiusRF r 
)
friend

Definition at line 369 of file carlsim_datastructures.h.

Member Data Documentation

◆ radX

double radX

Definition at line 373 of file carlsim_datastructures.h.

◆ radY

double radY

Definition at line 373 of file carlsim_datastructures.h.

◆ radZ

double radZ

Definition at line 373 of file carlsim_datastructures.h.


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