TarzaNN
TarzaNN neural network simulator
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends
FeaturePlaneAbstract Class Reference

#include <FeaturePlaneAbstract.h>

Inheritance diagram for FeaturePlaneAbstract:
Observer Viewable FeaturePlane FeaturePlaneProxy InputFeaturePlaneAbstract FeaturePlaneFHM FeaturePlaneHistogram LearningFeaturePlane MGMotionFeaturePlane MotionFeaturePlane SaliencyFeaturePlane SaliencyOutputFeaturePlane ConstantInputFeaturePlane InputCameraFeaturePlane InputControllerAbstract InputFeaturePlane InputLearningFeaturePlane InputMultipleFeaturePlane

List of all members.

Public Member Functions

 ~FeaturePlaneAbstract ()
void run ()
 Entry point for thread pool invocation.
void notify ()
void notify (bool functional)
virtual void updateNN (Observer *sourceFP, bool functional)
void attachProxy (NodeProxy *np)
void addToHistory (OutputImage *tmpElement, set< OutputImage * > *tmpOutputHistory)
void addToHistory (OutputImage *tmpElement, set< OutputImage * > *tmpOutputHistory, OutputImage **currOutput, QMutex *currOutputMutex)
void emptyHistory (set< OutputImage * > *tmpOutputHistory)
void StartThread ()
void PauseThread ()
void TerminateThread ()
void setName (QString *tmpName)
double getDisplayScale ()
double getDisplayAngle ()
double getDisplayDelta ()
QString * getName ()
void setTheta (float t)
void setLayerIndex (int l)
int getLayerIndex ()
LayergetLayer (int layerIndex)
int getSpeeds ()
int getSpeed ()
int getAngles ()
int getAngle ()
void setFeatureBias (float tmpBias)
float getFeatureBias ()
void setSpatialBias (Matrix *tmpSpatialBias)
void setSpatialTaskBias (OutputImage *tmpSpatialBias)
int getXSize ()
int getYSize ()
bool isWTA ()
virtual FeaturePlaneInputaddFilter (Filter *f, FeaturePlaneAbstract *fp, int type, int fpOutputIndex, bool wta)
virtual void editFeaturePlaneInput (FeaturePlaneInput *oldElement, FeaturePlaneInput *newElement)
virtual void removeFeaturePlaneInput (FeaturePlaneInput *theElement)
virtual void removeFeaturePlaneInput (FeaturePlaneAbstract *theElement)
virtual void removeFeaturePlaneInputs ()
virtual OutputImagegetCurrentOutput (int index)
OutputImagegetGatingControlOutput (int index)
int getGatingControlOutputCount ()
virtual void inhibitReturn ()
void initSelectiveTuning ()
virtual OutputImagegetCurrentOutput ()
OutputImagegetImage ()
MatrixgetMap ()
void releaseMap ()
virtual PlaneInputsgetRegularInputList ()
virtual PlaneInputsgetMaskingInputList ()
virtual PlaneInputsgetNonFourierInputList ()
virtual PlaneInputsgetGatingControlInputList ()
virtual int getGatingControlInputListSize ()
virtual float getMaxActivation ()
virtual bool isInputFP ()
virtual MatrixgetGatingControl ()
virtual void releaseGatingControl ()
void setParameters (paramMap params)
void XMLSerialize (int tabs, QTextStream *buf)
int getID ()
void setNode (NodeAbstract *n)
void setThreshold (float t)
void setThresholdPercent (float t)
void setThresholdBinarize (float t)
void setFunction (pt2Function theFunction)
virtual bool moveHead (int deltaX, int deltaY, bool notify=true)
virtual void processTargetPlane ()
virtual OutputImagegetHeadImage ()
virtual QImage * getVirtualImage (bool showRect)
void selectWinner (int selectX, int selectY)

Static Public Member Functions

static int getType (const QString name)
static QString getType (int value)
static bool CompareLayer (const FeaturePlaneAbstract *d1, const FeaturePlaneAbstract *d2)

Public Attributes

int gatingControlInputCount
MatrixiorMap
int iterations
int fpType
NotifyStrategyAbstracttheNotifyStrategy
NeurontheNeuronStrategy
FPDesignerInfo designerInfo
UI_FeaturePlanefpViewerWindow
 FP output viewer window.
UI_NeuronTimeCourseneuronTimeCourseWindow
 Neuron Time Course window.

Static Public Attributes

static QWaitCondition * workingThreadsCond
static QMutex workingThreadsMutex
static int currentLayer = 0
static int workingThreads = 0
static int totalWorkingThreads = 0

Protected Member Functions

 FeaturePlaneAbstract ()
 FeaturePlaneAbstract (Network *net, int l, QString *n, int w, int h, int angles, int speeds, int alpha, int speed, bool isWTA, bool visible, NotifyStrategyAbstract *notify, Neuron *neuron=NULL)
void init ()
void createGatingControl ()
void applyGatingControl ()
void _XMLSerialize (int &tabs, QTextStream *buf, PlaneInputs *tmpList, int type)

Protected Attributes

Networknn
int layerIndex
OutputImagecurrentOutput
set< OutputImage * > outputHistory
QMutex currentOutputMutex
OutputImage ** workOutputList
OutputImage ** currentOutputList
OutputImage ** currentGatingControlOutputList
int gatingControlOutputCount
QMutex currentOutputListMutex
QMutex gatingControlOutputListMutex
set< OutputImage * > ** outputHistoryList
set< OutputImage * > ** gatingControlHistoryList
OutputImageworkOutput
QMutex gcMutex
PlaneInputs gatingControlInputList
OutputImagetheGatingControl
int speeds
int angles
int speed
int alpha
int width
int height
int outputs
int inputs
bool is_WTA
float theta
float threshold
float threshold_percent
float threshold_binarize
MatrixspatialBias
float featureBias
int fpID
NodeAbstract_parentNode
pt2Function functionCall
paramMap initParams
QMutex observerProxyMutex
list< NodeProxy * > _observersProxyList

Friends

class FeaturePlaneFactory
class ClientSocket
class UI_FeaturePlaneProp
class UI_FilterProp
class Network
class UI_DesignerPropDisplay

Constructor & Destructor Documentation

FeaturePlaneAbstract::~FeaturePlaneAbstract ( )

destructor.

FeaturePlaneAbstract::FeaturePlaneAbstract ( ) [protected]

Default constructor

FeaturePlaneAbstract::FeaturePlaneAbstract ( Network net,
int  l,
QString *  n,
int  w,
int  h,
int  angles,
int  speeds,
int  alpha,
int  speed,
bool  isWTA,
bool  visible,
NotifyStrategyAbstract notify,
Neuron neuron = NULL 
) [protected]

Constructor

Parameters:
net- network, this FP will be added to the end of the list of feature planes
l- layer index
name- name of the feature plane
w- width
h- height
angles- number of discrete angles (e.g. speeds, orientations)
speeds- number of speeds (e.g. speed bands, scale bands)
alpha- alpha
speed- speed of this fp
isWTA- participates in Selective Tuning
visible- should the FP be presented in the UI
notify- notification strategy (deprecated, on the way out)
neuron- neuron strategy (what is the output nonlinearity, or the ODE that defines response)

Member Function Documentation

void FeaturePlaneAbstract::_XMLSerialize ( int &  tabs,
QTextStream *  buf,
PlaneInputs tmpList,
int  type 
) [protected]
virtual FeaturePlaneInput* FeaturePlaneAbstract::addFilter ( Filter f,
FeaturePlaneAbstract fp,
int  type,
int  fpOutputIndex,
bool  wta 
) [inline, virtual]

Add an input filter/feature plane pair. In general, do nothing, redefined in FeaturePlane

Reimplemented in FeaturePlane, LearningFeaturePlane, InputFeaturePlaneAbstract, STSOMFeaturePlane, CTSOMFeaturePlane, and FeaturePlaneProxy.

void FeaturePlaneAbstract::addToHistory ( OutputImage tmpElement,
set< OutputImage * > *  tmpOutputHistory 
)

Add output to history.

void FeaturePlaneAbstract::addToHistory ( OutputImage tmpElement,
set< OutputImage * > *  tmpOutputHistory,
OutputImage **  currOutput,
QMutex *  currOutputMutex 
)

Add output to history using a specific mutexes -> only invoked when having more than one current output.

void FeaturePlaneAbstract::applyGatingControl ( ) [protected]
void FeaturePlaneAbstract::attachProxy ( NodeProxy np)

Attach an observer located on a different node.

static bool FeaturePlaneAbstract::CompareLayer ( const FeaturePlaneAbstract d1,
const FeaturePlaneAbstract d2 
) [inline, static]
void FeaturePlaneAbstract::createGatingControl ( ) [protected]
virtual void FeaturePlaneAbstract::editFeaturePlaneInput ( FeaturePlaneInput oldElement,
FeaturePlaneInput newElement 
) [inline, virtual]

Reimplemented in FeaturePlane.

void FeaturePlaneAbstract::emptyHistory ( set< OutputImage * > *  tmpOutputHistory)

Clean output history.

int FeaturePlaneAbstract::getAngle ( ) [inline]
int FeaturePlaneAbstract::getAngles ( ) [inline]

Reimplemented in MGMotionFeaturePlane.

OutputImage * FeaturePlaneAbstract::getCurrentOutput ( int  index) [virtual]

Returns the feature plane's latest output, with an index for multi-output FPs. Overloaded in InputControllerAbstract and InputFeaturePlane where we can get RGB independently.

Reimplemented in FeaturePlane, InputMultipleFeaturePlane, and InputLearningFeaturePlane.

OutputImage * FeaturePlaneAbstract::getCurrentOutput ( ) [virtual]

Returns the feature plane's latest output.

Reimplemented in InputMultipleFeaturePlane, and InputLearningFeaturePlane.

double FeaturePlaneAbstract::getDisplayAngle ( )

Get the display angle - see void setName(QString* tmpName);

double FeaturePlaneAbstract::getDisplayDelta ( )

Get the display delta - see void setName(QString* tmpName);

double FeaturePlaneAbstract::getDisplayScale ( )

Get the display scale - see void setName(QString* tmpName);

float FeaturePlaneAbstract::getFeatureBias ( )

Return Feature bias. One value for the whole feature map (0-1, default 1)

Matrix * FeaturePlaneAbstract::getGatingControl ( ) [virtual]

Return the internal gating control for display purposes. Locks gcMutex

virtual PlaneInputs* FeaturePlaneAbstract::getGatingControlInputList ( ) [inline, virtual]
virtual int FeaturePlaneAbstract::getGatingControlInputListSize ( ) [inline, virtual]
OutputImage * FeaturePlaneAbstract::getGatingControlOutput ( int  index)
int FeaturePlaneAbstract::getGatingControlOutputCount ( )
virtual OutputImage* FeaturePlaneAbstract::getHeadImage ( ) [inline, virtual]
int FeaturePlaneAbstract::getID ( )

Returns the index in the feature plane list

OutputImage* FeaturePlaneAbstract::getImage ( ) [inline, virtual]

Viewable function

Reimplemented from Viewable.

Layer * FeaturePlaneAbstract::getLayer ( int  layerIndex)

Get the layer to which this fp belongs

int FeaturePlaneAbstract::getLayerIndex ( )

Get the index of the layer to which this fp belongs

Matrix* FeaturePlaneAbstract::getMap ( ) [inline, virtual]

Viewable function

Reimplemented from Viewable.

virtual PlaneInputs* FeaturePlaneAbstract::getMaskingInputList ( ) [inline, virtual]

Reimplemented in FeaturePlane.

virtual float FeaturePlaneAbstract::getMaxActivation ( ) [inline, virtual]

Reimplemented in FeaturePlane.

QString * FeaturePlaneAbstract::getName ( )

Get feature plane name.

virtual PlaneInputs* FeaturePlaneAbstract::getNonFourierInputList ( ) [inline, virtual]

Reimplemented in FeaturePlane.

virtual PlaneInputs* FeaturePlaneAbstract::getRegularInputList ( ) [inline, virtual]

Reimplemented in FeaturePlane.

int FeaturePlaneAbstract::getSpeed ( ) [inline]
int FeaturePlaneAbstract::getSpeeds ( ) [inline]

Reimplemented in MGMotionFeaturePlane.

int FeaturePlaneAbstract::getType ( const QString  name) [static]
QString FeaturePlaneAbstract::getType ( int  value) [static]

Reimplemented in FeaturePlaneProxy.

virtual QImage* FeaturePlaneAbstract::getVirtualImage ( bool  showRect) [inline, virtual]

Reimplemented in InputVirtualFeaturePlane.

int FeaturePlaneAbstract::getXSize ( )
int FeaturePlaneAbstract::getYSize ( )
void FeaturePlaneAbstract::inhibitReturn ( ) [virtual]
void FeaturePlaneAbstract::init ( ) [protected]
void FeaturePlaneAbstract::initSelectiveTuning ( )
virtual bool FeaturePlaneAbstract::isInputFP ( ) [inline, virtual]

Reimplemented in InputFeaturePlaneAbstract.

bool FeaturePlaneAbstract::isWTA ( )
virtual bool FeaturePlaneAbstract::moveHead ( int  deltaX,
int  deltaY,
bool  notify = true 
) [inline, virtual]

todo update due to the fact we have implemented InputControllerAbstract with templates, we cannot do dynamic casting. we will have to overload a whole bunch of methods in the appropriate classes

Reimplemented in InputSocketFeaturePlane, and InputVirtualFeaturePlane.

void FeaturePlaneAbstract::notify ( )

Notify all observers of new output being available

void FeaturePlaneAbstract::notify ( bool  functional)

Notify all observers of new output being available If functional is false, only GUI gets updated

void FeaturePlaneAbstract::PauseThread ( )

Dummy worker to wake up the thread, just in case it was waiting due to a SYNC Notification

virtual void FeaturePlaneAbstract::processTargetPlane ( ) [inline, virtual]

Reimplemented in InputControllerAbstract.

void FeaturePlaneAbstract::releaseGatingControl ( ) [virtual]

Release gcMutex

void FeaturePlaneAbstract::releaseMap ( ) [inline, virtual]

Reimplemented from Viewable.

virtual void FeaturePlaneAbstract::removeFeaturePlaneInput ( FeaturePlaneInput theElement) [inline, virtual]

Reimplemented in FeaturePlane.

virtual void FeaturePlaneAbstract::removeFeaturePlaneInput ( FeaturePlaneAbstract theElement) [inline, virtual]

Reimplemented in FeaturePlane.

virtual void FeaturePlaneAbstract::removeFeaturePlaneInputs ( ) [inline, virtual]

Reimplemented in FeaturePlane.

void FeaturePlaneAbstract::run ( )
void FeaturePlaneAbstract::selectWinner ( int  selectX,
int  selectY 
)

Manually select winners from the UI

void FeaturePlaneAbstract::setFeatureBias ( float  tmpBias)

Initialize Feature bias. One value for the whole feature map (0-1, default 1)

void FeaturePlaneAbstract::setFunction ( pt2Function  theFunction)

Set helper function call that will be invoked at the end of each iteration. The function has to be defined as a static member of the class FeaturePlaneHelper

void FeaturePlaneAbstract::setLayerIndex ( int  l)

Set the layer to which this fp belongs

void FeaturePlaneAbstract::setName ( QString *  tmpName)

Set feature plane name.
Also parse the name for motion-model style display purposes
Convention: Some_name_SCALE_ANGLE_DELTA (where SCALE, ANGLE and DELTA are numbers)
Note: not all need to be present, but they can not be missing from the beginning or middle, i.e. you can have SCALE without DELTA, but not DELTA without SCALE and ANGLE

void FeaturePlaneAbstract::setNode ( NodeAbstract n)

Set the node to which this FP belongs.

void FeaturePlaneAbstract::setParameters ( paramMap  params)
void FeaturePlaneAbstract::setSpatialBias ( Matrix tmpSpatialBias)

Initialize Spatial bias map. Does not do a deep copy, so be careful !

void FeaturePlaneAbstract::setSpatialTaskBias ( OutputImage tmpSpatialBias)

Initialize Spatial bias map based on task as a first approximation, threshold input and scale

void FeaturePlaneAbstract::setTheta ( float  t)

Set STM WTA theta parameter.

void FeaturePlaneAbstract::setThreshold ( float  t)

Set the node to which this FP belongs.

void FeaturePlaneAbstract::setThresholdBinarize ( float  t)
void FeaturePlaneAbstract::setThresholdPercent ( float  t)
void FeaturePlaneAbstract::StartThread ( )
void FeaturePlaneAbstract::TerminateThread ( )
void FeaturePlaneAbstract::updateNN ( Observer sourceFP,
bool  functional 
) [virtual]

Implements Observer.

void FeaturePlaneAbstract::XMLSerialize ( int  tabs,
QTextStream *  buf 
)

Friends And Related Function Documentation

friend class ClientSocket [friend]
friend class FeaturePlaneFactory [friend]
friend class Network [friend]

Reimplemented in InputFeaturePlane.

friend class UI_DesignerPropDisplay [friend]
friend class UI_FeaturePlaneProp [friend]
friend class UI_FilterProp [friend]

Member Data Documentation

int FeaturePlaneAbstract::alpha [protected]

display parameters for the UI_Designer

Feature bias factor - 0-1

int FeaturePlaneAbstract::fpID [protected]

FP output viewer window.

QMutex FeaturePlaneAbstract::gcMutex [protected]

Mutex controling access to the gating control

Inhibition of return map. STM requires selected connections to be inhibited for IOR, this is not it, just black out parts of the input for now

bool FeaturePlaneAbstract::is_WTA [protected]

the no. of iterations

Neuron Time Course window.

Spatial bias mask

int FeaturePlaneAbstract::speed [protected]

The neuron strategy

The notify strategy

float FeaturePlaneAbstract::theta [protected]

All activations below this value are set to zero

All activations below this percentage of the maximum are set to zero, above set to 1. Percent is expressed as 0.xxx (i.e. for 80% declare 0.8 in the xml)

All activations below this percentage of the maximum are set to zero. Percent is expressed as 0.xxx (i.e. for 80% declare 0.8 in the xml)

int FeaturePlaneAbstract::width [protected]
QWaitCondition* FeaturePlaneAbstract::workingThreadsCond [static]

Specify whether the feature planes should wait for each other or not

Temporary storage for the output


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines