TarzaNN
TarzaNN neural network simulator
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
Network Class Reference

#include <Network.h>

List of all members.

Public Member Functions

 Network (UI_MainWindow *theMainWindow, QObject *app, char *inputFileName=NULL)
 ~Network ()
void run ()
void terminate ()
void save (QString filename)
void load (char *inputFileName)
void resetLayers ()
void assignLayers ()
void XMLSerialize (int tabs, QTextStream *buf)
FeaturePlaneAbstractaddFeaturePlane (QString *newName, QString newFPType, paramMap newParams, int l)
FeaturePlaneAbstracteditFeaturePlane (FeaturePlaneAbstract *theOld, QString *newName, QString newFPType, paramMap newParams, int l)
void deleteFeaturePlane (FeaturePlaneAbstract *oldFP)
FeaturePlaneInputaddFeaturePlaneInput (FeaturePlaneAbstract *FPSource, FeaturePlaneAbstract *FPDest, QString newFType, paramMap newParams, int newInputType, int newOutputIndex)
FeaturePlaneInputeditFeaturePlaneInput (FeaturePlaneInput *oldElement, QString newFType, paramMap newParams, int newInputType, int newOutputIndex)
void deleteFeaturePlaneInput (FeaturePlaneInput *theElement)
int addLayer (QString name, int dirs, int scales, int type=0)
void addToLayer (FeaturePlaneAbstract *cur, int count)
void setMonitor (Monitor *m)
MonitorgetMonitor ()
void setLearningOutputFP (LearningFeaturePlane *fp)
LearningFeaturePlanegetLearningOutputFP ()
void setLearningWinner (Matrix *c)
MatrixgetLearningWinner ()
FeaturePlaneAbstractgetInputFP ()
FeaturePlaneAbstractgetFPByName (QString searchName)
void applyIOR ()
 Trigger IOR on the network.
int getLayerCount ()
 Get number of Layers.
LayergetLayer (int layerIndex)
 Get a Layer.
int getDepth ()
 Get network depth - i.e. max distance from input to an FP.
void readLearningLayer ()
void readLearningLayer (QString s)
void saveLearningLayer ()
void saveLearningLayer (QString s)
bool isPaused ()
 Is network paused?
void setPaused (bool status)
 Pause network.
void notifyChangeDisplay ()
void setupFeatureTask ()
void setupSpatialTask (OutputImage *tmpSpatialBias)

Static Public Member Functions

static void tabulate (int tabs, QTextStream *buf)
static NetworkgetNetwork ()
static void setNetwork (Network *nn)

Public Attributes

vector< NodeProxy * > _nodeList
vector< FeaturePlaneAbstract * > _featurePlaneList
vector< FeaturePlaneAbstract * > * _learningFeaturePlanes
vector< Layer * > _featurePlaneLayers
QMutex * _featurePlaneLayerMutex
QWaitCondition * _featurePlaneLayerCond
UI_MainWindowmainWindow
bool changed

Static Public Attributes

static NetworktheNetworkInstance = NULL
static bool useStepByStep = false
 Sync - stop after each pass through the network.
static bool useLayerByLayer = false
 Sync - stop after each layer.
static QWaitCondition pauseWaitCond
static QMutex threadStatus
static bool shouldPause = false
static bool doSTM_WTA = false

Detailed Description

The root data structure. It contains Nodes (real and proxy) and FeaturePlanes (real and proxy). A network can be created through XML or through direct coding.


Constructor & Destructor Documentation

Network::Network ( UI_MainWindow theMainWindow,
QObject *  app,
char *  inputFileName = NULL 
)

GUI constructor.

Parameters:
theMainWindow- the main window of the application
app- the application
Network::~Network ( )

Destructor


Member Function Documentation

FeaturePlaneAbstract * Network::addFeaturePlane ( QString *  newName,
QString  newFPType,
paramMap  newParams,
int  l 
)
FeaturePlaneInput * Network::addFeaturePlaneInput ( FeaturePlaneAbstract FPSource,
FeaturePlaneAbstract FPDest,
QString  newFType,
paramMap  newParams,
int  newInputType,
int  newOutputIndex 
)
int Network::addLayer ( QString  name,
int  dirs,
int  scales,
int  type = 0 
)
void Network::addToLayer ( FeaturePlaneAbstract cur,
int  count 
)
void Network::applyIOR ( )

Trigger IOR on the network.

void Network::assignLayers ( )

Assign layer numbers

void Network::deleteFeaturePlane ( FeaturePlaneAbstract oldFP)
void Network::deleteFeaturePlaneInput ( FeaturePlaneInput theElement)
FeaturePlaneAbstract * Network::editFeaturePlane ( FeaturePlaneAbstract theOld,
QString *  newName,
QString  newFPType,
paramMap  newParams,
int  l 
)
FeaturePlaneInput * Network::editFeaturePlaneInput ( FeaturePlaneInput oldElement,
QString  newFType,
paramMap  newParams,
int  newInputType,
int  newOutputIndex 
)
int Network::getDepth ( )

Get network depth - i.e. max distance from input to an FP.

FeaturePlaneAbstract * Network::getFPByName ( QString  searchName)
FeaturePlaneAbstract * Network::getInputFP ( )
Layer* Network::getLayer ( int  layerIndex) [inline]

Get a Layer.

int Network::getLayerCount ( )

Get number of Layers.

LearningFeaturePlane * Network::getLearningOutputFP ( )
Matrix * Network::getLearningWinner ( )
Monitor * Network::getMonitor ( )
static Network* Network::getNetwork ( ) [inline, static]
bool Network::isPaused ( ) [inline]

Is network paused?

void Network::load ( char *  inputFileName)

loads the content of a network from a file

void Network::notifyChangeDisplay ( )
void Network::readLearningLayer ( )
void Network::readLearningLayer ( QString  s)
void Network::resetLayers ( )

Clear the layers data structure. Useful when redesigning an existing network, to keep _featurePlaneLayers and _featurePlaneList in sync

void Network::run ( )

Start network execution

void Network::save ( QString  filename)

saves the content of a network in a file

void Network::saveLearningLayer ( )
void Network::saveLearningLayer ( QString  s)
void Network::setLearningOutputFP ( LearningFeaturePlane fp)
void Network::setLearningWinner ( Matrix c)
void Network::setMonitor ( Monitor m)
static void Network::setNetwork ( Network nn) [inline, static]
void Network::setPaused ( bool  status) [inline]

Pause network.

void Network::setupFeatureTask ( )

Read activations and set up task biases, reset network

void Network::setupSpatialTask ( OutputImage tmpSpatialBias)

Apply spatial mask to output, propagate towards input

void Network::tabulate ( int  tabs,
QTextStream *  buf 
) [static]

Pretty-print for XMLSerialize

void Network::terminate ( )

TBD

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

Cast the network as XML


Member Data Documentation

STL vector of all the layers in the system

STL vector of all the feature planes in the system

STL vector of all the nodes in the system

bool Network::doSTM_WTA = false [static]
QWaitCondition Network::pauseWaitCond [static]
bool Network::shouldPause = false [static]
QMutex Network::threadStatus [static]
bool Network::useLayerByLayer = false [static]

Sync - stop after each layer.

bool Network::useStepByStep = false [static]

Sync - stop after each pass through the network.


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