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

ANNLayering Class Reference

Older, layered ANN topology. More...

#include <topology.h>

Inheritance diagram for ANNLayering:

LayeredTopology List of all members.

Public Methods

 ANNLayering (const char *description=NULL)
void make (const char *description)
int layerIndex (int layer) const
void getPos (int i, int &layerno, int &layerpos) const
int totalUnits () const
int layers () const
String toString () const
int layerSize (int i) const
int operator[] (int i) const
int & operator[] (int i)
void empty ()
void operator= (const ANNLayering &o)
void removeLayer (int i)

Detailed Description

Older, layered ANN topology.

Currently semi-obsolete, but still used by various parts of Inanna.

Definition at line 71 of file topology.h.


Constructor & Destructor Documentation

ANNLayering const char *    description = NULL [inline]
 

Standard constructor.

See make for info about the parameters.

Definition at line 78 of file topology.h.

References make().


Member Function Documentation

void empty   [inline]
 

Clears the layering; makes the network description empty.

Reimplemented in LayeredTopology.

Definition at line 119 of file topology.h.

Referenced by LayeredTopology::empty().

void getPos int    i,
int &    layerno,
int &    layerpos
const
 

Calculates the relative layer and offset for given absolute unit index.

Parameters:
i  Neuron index.
layerno  Reference-returned result: layer index where the neuron resides.
layerpos  Reference-returned result: position of the neuron on the layer indicated by the layerno result parameter.

Definition at line 99 of file topology.cc.

Referenced by ANNetwork::cleanup(), and ANNetwork::connectFfw().

int layerIndex int    layer const
 

Calculates the absolute neuron index offset for the given layer index; index of the first neuron on that layer.

If the given layer index is negative, it is substracted from the number of layers (-1 means the output layer, -2 the layer below that, etc).

Definition at line 75 of file topology.cc.

Referenced by ANNetwork::connectFfw(), ANNetwork::connectFullFfw(), ANNetwork::drawFeedForward(), and totalUnits().

int layers   const [inline]
 

Returns the number of layers in the network.

Definition at line 90 of file topology.h.

Referenced by ANNetwork::connectFullFfw(), ANNetwork::drawEPS(), ANNetwork::drawFeedForward(), and toString().

int layerSize int    i const [inline]
 

Returns the size of the layer i.

Const version.

If the given layer index is negative, it is substracted from the number of layers (-1 means the output layer, -2 the layer below that, etc).

Definition at line 99 of file topology.h.

void make const char *    description
 

Sets the layer structure according to the given description string.

Parameters:
description  Textual layer description. Consists of layer sizes separated by '-'-marks. For example: "2-10-10-1". NOTE: The layer sizes may currently NOT have additional qualifiers that are not numbers, for example: "S2-10-10-L10". These qualifiers are usually intended for the AnyNetwork inheritor, and should ignored here, but, as said, are currently not.

Definition at line 54 of file topology.cc.

Referenced by ANNLayering(), ANNetwork::drawFeedForward(), and LayeredTopology::LayeredTopology().

void operator= const ANNLayering &    o [inline]
 

Standard copy operator.

Definition at line 122 of file topology.h.

References mLayers.

int& operator[] int    i [inline]
 

Returns the size of the layer i.

Non-const version.

If the given layer index is negative, it is substracted from the number of layers (-1 means the output layer, -2 the layer below that, etc).

Definition at line 115 of file topology.h.

int operator[] int    i const [inline]
 

Returns the size of the layer i.

Const version.

If the given layer index is negative, it is substracted from the number of layers (-1 means the output layer, -2 the layer below that, etc).

Definition at line 107 of file topology.h.

void removeLayer int    i [inline]
 

Removes a layer.

NOTE: The negative indexing is not allowed here.

Definition at line 127 of file topology.h.

Referenced by ANNetwork::cleanup().

String toString   const
 

Converts the layering back to layering description string.

Definition at line 108 of file topology.cc.

References layers().

int totalUnits   const [inline]
 

Returns the total number of units in the network.

Definition at line 86 of file topology.h.

References layerIndex().


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 20:06:45 2005 for Inanna by doxygen1.2.18