Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

Layer Class Reference

Layer groups a number of Neurons for convenience. Layer is not needed to operate the network. More...

#include <amygdala/layer.h>

List of all members.

Public Types

typedef vector< Neuron
* >::iterator 
iterator
typedef vector< Neuron
* >::const_iterator 
const_iterator
typedef vector< Neuron
* >::reverse_iterator 
reverse_iterator
typedef vector< Neuron
* >::const_reverse_iterator 
const_reverse_iterator

Public Methods

 Layer ()
 ~Layer ()
void AddNeuron (Neuron *nrn)
void AddNeuronVector (vector< Neuron * > nrnVec)
void LayerName (string name)
string LayerName ()
void SetLayerId (unsigned int id)
unsigned int LayerId ()
void SetLayerType (LayerType ltype)
LayerType GetLayerType ()
void SetPercentInhibitory (float percent)
bool ConnectLayers (Layer *output, UniConnectType parms, float pctInhibitory=0.0)
bool ConnectLayers (Layer *output, GaussConnectType parms, float pctInhibitory=0.0)
bool SetLayerConstants (LayerConstants lconst)
LayerConstants GetLayerConstants ()
void SetSynapticDelay (AmTimeInt delay)
AmTimeInt GetSynapticDelay () const
unsigned int size ()
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
reverse_iterator rbegin ()
reverse_iterator rend ()
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const
Neuronoperator[] (unsigned int &index)

Protected Methods

void SetLayerParent (Network *parent)
bool ConnectionInhibitory (float &pctInhibitory)

Protected Attributes

vector< Neuron * > nrnLayer
NetworkparentNet
string layerName
LayerType layerType
unsigned int layerId
float learningConst
float memTimeConst
float synTimeConst
float restPtnl
float thresholdPtnl
bool constantsSet
float percentInhib
AmTimeInt synapticDelay

Friends

class Network


Detailed Description

Layer groups a number of Neurons for convenience. Layer is not needed to operate the network.

The only limitation currently is that unlayered Networks cannot be loaded or saved. This limitation should be addressed in 0.3.

See also:
Neuron, Network, NetLoader
Author:
Matt Grover


Member Function Documentation

void Layer::AddNeuron Neuron   nrn
 

Add a pre instantiated Neuron to the Layer. This doesn't affect the ownership of the Neuron until the Layer is added to a Network. At that point, the Network will assume ownership of the pointer. Neurons that are added to layers do not need to be added to a Network separately.

Parameters:
nrn  Pointer to a Neuron object that will be added to the Layer.
See also:
Network::AddLayer()

void Layer::AddNeuronVector vector< Neuron * >    nrnVec
 

Add pre instantiated Neuron objects to the Layer. This doesn't affect the ownership of the Neuron until the Layer is added to a Network. At that point, the Network will assume ownership of the pointer. Neurons that are added to layers do not need to be added to a Network separately.

Parameters:
nrnVec  Vector of pointers to Neuron objects that will be added to the Layer.
See also:
Network::AddLayer()

const_iterator Layer::begin   const [inline]
 

Returns:
An iterator (vector<Neuron*>) pointing to the first neuron in the layer.

iterator Layer::begin   [inline]
 

Returns:
An iterator (vector<Neuron*>) pointing to the first neuron in the layer.

bool Layer::ConnectLayers Layer *    output,
GaussConnectType    parms,
float    pctInhibitory = 0.0
 

Connect this layer to to another layer.

Parameters:
output  Layer that will receive input from this layer.
parms  Gaussian connection parameters. Layers connected with this parameter type will have weights set from a random Gaussian distribution.
pctInhibitory  If Neuron::EnforceSign() has not been set prior to connecting the layers, then this can be used to set the number of connections to output that will have a negative weight. pctInhibitory will be ignored if sign enforcement has been turned on and must be in the range 0 -> 100.0.
See also:
Node::ConnectLayers()

bool Layer::ConnectLayers Layer *    output,
UniConnectType    parms,
float    pctInhibitory = 0.0
 

Connect this layer to to another layer.

Parameters:
output  Layer that will receive input from this layer.
parms  Uniform connection parameters. Layers connected with this parameter type will have weights set from a uniform random distribution.
pctInhibitory  If Neuron::EnforceSign() has not been set prior to connecting the layers, then this can be used to set the number of connections to output that will have a negative weight. pctInhibitory will be ignored if sign enforcement has been turned on and must be in the range 0 -> 100.0.
See also:
Node::ConnectLayers()

const_iterator Layer::end   const [inline]
 

Returns:
An iterator (vector<Neuron*>) pointing to the last neuron in the layer.

iterator Layer::end   [inline]
 

Returns:
An iterator (vector<Neuron*>) pointing to the last neuron in the layer.

LayerConstants Layer::GetLayerConstants  
 

Retrieve the set of constants that are common to all Neurons in a layer if they have been previously set.

Returns:
LayerConstants struct.
See also:
SetLayerConstants()

LayerType Layer::GetLayerType   [inline]
 

Get the layer type

Returns:
layer type

AmTimeInt Layer::GetSynapticDelay   const [inline]
 

Get the default spike transmission delay.

Returns:
The value of the delay in microseconds (us).

unsigned int Layer::LayerId   [inline]
 

Get the numeric ID of the Layer.

Returns:
Numeric ID.

string Layer::LayerName   [inline]
 

Retrieve the name of the Layer,

Returns:
Layer name.

void Layer::LayerName string    name [inline]
 

Set the name of the Layer. This is optional, but it can be useful after reloading a Network from a file.

Parameters:
name  Name of the Layer.

Neuron* Layer::operator[] unsigned int &    index [inline]
 

Returns:
A pointer to a member Neuron. The index is not related to the NeuronID.

const_reverse_iterator Layer::rbegin   const [inline]
 

Returns:
A reverse iterator (vector<Neuron*>) pointing to the first neuron in the layer.

reverse_iterator Layer::rbegin   [inline]
 

Returns:
A reverse iterator (vector<Neuron*>) pointing to the first neuron in the layer.

const_reverse_iterator Layer::rend   const [inline]
 

Returns:
A reverse iterator (vector<Neuron*>) pointing to the last neuron in the layer.

reverse_iterator Layer::rend   [inline]
 

Returns:
A reverse iterator (vector<Neuron*>) pointing to the last neuron in the layer.

bool Layer::SetLayerConstants LayerConstants    lconst
 

Set constants that should be common to all neurons in a layer, such as time constants and learning constants. This is optional and layers can be constructed without requiring that all member Neurons have the constants.

Parameters:
lconst  Layer constant structure.
See also:
GetLayerConstants()

void Layer::SetLayerId unsigned int    id [inline]
 

Set the unique numeric ID for the Layer.

Parameters:
id  Numeric id.

void Layer::SetLayerType LayerType    ltype [inline]
 

Designate what kind of layer this is

ap ltype layer type.

void Layer::SetPercentInhibitory float    percent
 

Set the percentage of neurons that should be inhibitory in the layer. This value can be overridden if it is also set in ConnectLayers if Neuron::EnforceSign() has not been called.

Parameters:
percent  Percentage of neurons that are inhibitory (0 - 100.0)
See also:
Neuron::EnforceSign()

void Layer::SetSynapticDelay AmTimeInt    delay [inline]
 

Set the default spike transmission delay.

Parameters:
delay  The value of the delay in microseconds (us).

unsigned int Layer::size   [inline]
 

Returns:
The size of the layer.


The documentation for this class was generated from the following file:
Generated on Wed Sep 4 02:30:36 2002 for Amygdala by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002