next up previous contents index
Next: Functions for the Up: Kernel Function Interface Previous: Functions for the

Link Functions

 

The following functions are available to define or determine the topology of the network:

krui_getFirstPredUnit( FlintType  *strength )
krui_getNextPredUnit( FlintType   *strength )
krui_getCurrentPredUnit( FlintType  *strength )
krui_getFirstSuccUnit( int  UnitNo, FlintType  *strength )
krui_getNextSuccUnit( FlintType  *strength )
krui_isConnected( int  source_unit_no )
krui_areConnected( int source_unit_no, int target_unit_no,
                   FlintType  *weight )
krui_getLinkWeight()
krui_setLinkWeight( FlintTypeParam  weight )
krui_createLink( int source_unit_no, FlintTypeParam  weight )
krui_deleteLink()
krui_deleteAllInputLinks()
krui_deleteAllOutputLinks()
krui_jogWeights( FlintTypeParam  minus, FlintTypeParam  plus)

int krui_getFirstPredUnit( FlintType *strength )
determines the unit number of the predecessor unit of the current unit and site; returns 0 if no such unit exists, i.e. if the current unit has no inputs. If a predecessor unit exists, the connection between the two units becomes current and its strength is returned. int krui_getNextPredUnit( FlintType *strength )
gets another predecessor unit of the current unit/site (returns 0 if no more exist). Otherwise like krui_getFirstPredUnit(...). int krui_getCurrentPredUnit( FlintType *strength )
yields the current predecessor unit. int krui_getFirstSuccUnit( int UnitNo, FlintType *strength )
yields unit number and connection strength of the first successor unit to the current unit. The return code is 0 if no such unit exists, i.e. the current unit has no outputs. If a successor unit exists, the connection between the two units becomes current. If the successor unit has sites, the site connected with this link becomes current site. The function is slow, because the units are connected only backwards (lookup time is proportional to the number of connections in the net). int krui_getNextSuccUnit( FlintType *strength )
gets another successor unit of the current unit (returns 0 if no other successors exist). Otherwise like krui_getFirstSuccUnit(...). The function is slow, because the units are only connected backwards. bool krui_isConnected( int source_unit_no )
checks, whether there is a connection between the current unit and the source unit. If this is true, this link becomes current and TRUE is returned.

bool krui_areConnected( int source_unit_no, int target_unit_no,
FlintType *weight )
checks, whether there is a connection between the source unit and the target unit. In contrast to krui_isConnected(...) this function traverses sites during the search. If there is such a connection, this link becomes current and TRUE is returned. FlintType krui_getLinkWeight()
void krui_setLinkWeight( FlintTypeParam weight )
determines/sets the connection weight of the current link.

krui_err krui_createLink( int source_unit_no, FlintTypeParam weight )
creates a new link between the current unit/site and the source unit. An error code is generated if a link between these two units already exists, or if the source unit does not exist. krui_err krui_deleteLink()
deletes the current link. To delete a connection between the current unit/site and the source unit a sequence of krui_isConnected( source_unit_no ) and krui_deleteLink() is ideal. krui_err krui_deleteAllInputLinks()
krui_err krui_deleteAllOutputLinks()
deletes all inputs/outputs at the current unit/site. void krui_jogWeights( FlintTypeParam minus, FlintTypeParam plus)
adds uniform distributed random values to the connection weights of the network. Minus must be less then plus. See also krui_setSeedNo(...).



next up previous contents index
Next: Functions for the Up: Kernel Function Interface Previous: Functions for the



Niels Mache
Wed May 17 11:23:58 MET DST 1995