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

Node Class Reference

#include <amygdala/node.h>

List of all members.

Public Methods

 ~Node ()
void Run (unsigned int maxRunTime)
MpNetworkMakeNetwork (int instId)
void ConnectNeurons (AmIdInt preInstId, AmIdInt preNId, AmIdInt postInstId, AmIdInt postNId, float weight, AmTimeInt delay)
void UdpListener (int port)
unsigned int GetMaxRunTime ()
bool NNthreadSleep (unsigned int simTime)
void NNthreadWakeUp ()
void Save (string filename)
void ConnectLayers (AmIdInt preInstance, AmIdInt preLayer, AmIdInt postInstance, AmIdInt postLayer, GaussConnectType parms, float pctInhibitory=0.0)
void Load (string filename)
void DeleteInstance (AmIdInt instId)
NetworkGetNetwork (AmIdInt instId)
hash_map< AmIdInt, Instance
* >::iterator 
instance_begin ()
hash_map< AmIdInt, Instance
* >::iterator 
instance_end ()
InstanceGetInstance (AmIdInt instId)

Static Public Methods

Node * GetNodeRef ()

Protected Attributes

hash_map< AmIdInt, Instance * > instances
unsigned int maxRunTime
int sleepers
int NNthreads
pthread_mutex_t mut_sleeper
pthread_cond_t cond_sleeper

Static Protected Attributes

Node theNode


Detailed Description

A singleton class. Wraps the Network objects (instances) of one Node.
Author:
Rudiger Koch <rkoch@rkoch.org>


Member Function Documentation

void Node::ConnectLayers AmIdInt    preInstance,
AmIdInt    preLayer,
AmIdInt    postInstance,
AmIdInt    postLayer,
GaussConnectType    parms,
float    pctInhibitory = 0.0
 

Connect 2 layers of different network instances

Exceptions:
runtime_error  If a layer doesn't exist
See also:
Layer::ConnectLayers()

void Node::ConnectNeurons AmIdInt    preInstId,
AmIdInt    preNId,
AmIdInt    postInstId,
AmIdInt    postNId,
float    weight,
AmTimeInt    delay
 

connect two neurons, possibly on different instances, possibly on different nodes

Parameters:
preInstId  a valid instance in THIS Node
preNId  a valid neuron ID in preInstId
postInstId  a valid instance ID
postNId  a valid neuron ID in postInstId
weight  the weight of the synapse
Exceptions:
runtime_error  One or both neurons do not exist

void Node::DeleteInstance AmIdInt    instId
 

Delete an Instance. Note that synapses to neurons within this instance are not removed in other Instances

Instance* Node::GetInstance AmIdInt    instId
 

Returns:
a pointer to the instance specified by the parameter

Network* Node::GetNetwork AmIdInt    instId
 

Returns:
the Network instance given by instId
Parameters:
A  valid instance ID

Node* Node::GetNodeRef   [static]
 

Returns:
A reference to the Node object

hash_map<AmIdInt, Instance*>::iterator Node::instance_begin  
 

Returns:
an Iterator for Amygdala Instance s in the Node

hash_map<AmIdInt, Instance*>::iterator Node::instance_end  
 

Returns:
an Iterator for Amygdala Instance s in the Node

void Node::Load string    filename
 

Load an Amygdala SMP network

MpNetwork* Node::MakeNetwork int    instId
 

create a Network instance

Returns:
a pointer to the newly created MpNetwork

bool Node::NNthreadSleep unsigned int    simTime
 

a thread goes to sleep here. The last thread cannot go to sleep. In case we are the last, false is returned.

void Node::NNthreadWakeUp  
 

wake up all sleeping network threads

void Node::Run unsigned int    maxRunTime
 

run all instances

Parameters:
maxRunTime  the maximum time the simulation will run

void Node::Save string    filename
 

Save to a file. The file will get a .amg appended if it doesn't end on .amg. It will be a gzipped file for each Instance. All gzipped files will be tarred.

Exceptions:
runtime_error  If we cannot open the file, the temporary files or run out of disk space or an Instance is running

void Node::UdpListener int    port
 

turn on listening on port for incoming spikes

Parameters:
port  the UDP port to listen at


Member Data Documentation

hash_map<AmIdInt, Instance*> Node::instances [protected]
 

Maps instance IDs to Instance objects.

unsigned int Node::maxRunTime [protected]
 

the maximum time the networks of this node run

int Node::NNthreads [protected]
 

number of NN threads. This will remain constant after the simulation starts On SMP only, sleepers == threads indicate that we can go to the next timestep of the simulation

int Node::sleepers [protected]
 

number of threads that went to sleep after emptying their spike input buffers. This doesn't mean that such a thread is simply waiting for the next timestep. If more requests become available through the still active threads a sleeping thread must be woken up.

Node Node::theNode [static, protected]
 

The one and only node object


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