next up previous contents index
Next: Functions to Read Up: Kernel Function Interface Previous: Link Functions

Functions for the Manipulation of Prototypes

 

By describing the characteristic properties of units, like activation/output function and sites, the user can define unit prototypes (called f-types in SNNS). Thereby the user can create a library of units. It is a big advantage that each change to the prototypes in the library affects all units of this f-type in the whole network. This means, that all units of a certain type are updated with a change in the library. With the following functions prototypes can be defined and manipulated:

krui_setFirstFTypeEntry()
krui_setNextFTypeEntry()
krui_setFTypeEntry( char  *Ftype_symbol )
krui_getFTypeName()
krui_setFTypeName( char  *unitFType_name )
krui_getFTypeActFuncName()
krui_setFTypeActFunc( char  *act_func_name )
krui_getFTypeOutFuncName()
krui_setFTypeOutFunc( char  *out_func_name )
krui_setFirstFTypeSite()
krui_setNextFTypeSite()
krui_getFTypeSiteName()
krui_setFTypeSiteName( char  *FType_site_name )
krui_createFTypeEntry( char *FType_symbol,char *act_func,
                       char *out_func, int no_of_sites,
                       char * *array_of_site_names )
krui_deleteFTypeEntry( char *  FType_symbol )

bool krui_setFirstFTypeEntry()
bool krui_setNextFTypeEntry()
initializes the first/next prototype and makes it current. The return code is FALSE if no unit types are defined, otherwise TRUE. bool krui_setFTypeEntry( char *Ftype_symbol )
selects a prototype by a name and returns TRUE if the name exists. char *krui_getFTypeName()
determines the name of the current prototype. krui_err krui_setFTypeName( char *unitFType_name )
changes the name of the current prototype. The name has to be unambiguous, i.e. all names have to be different. If the name is ambiguous, or if memory allocation failed, an error code is returned. char *krui_getFTypeActFuncName()
determines the name of the activation function of the current prototype. krui_err krui_setFTypeActFunc( char * act_func_name )
changes the activation function of the current prototype; returns an error code if the given function is not a valid activation function. All units of the net that are derived from this prototype change their activation function. char *krui_getFTypeOutFuncName()
determines the name of the output function of the current prototype. krui_err krui_setFTypeOutFunc( char *out_func_name )
changes the output function of the current prototype; returns an error code if the given function is not a valid output function. All units of the net that are derived from this prototype change their output function. bool krui_setFirstFTypeSite()
selects the first site of the prototype (this site becomes current prototype site); returns TRUE if the prototype has sites. bool krui_setNextFTypeSite()
selects the next site of the prototype (this site becomes current prototype site); returns TRUE if the prototype has more sites. char *krui_getFTypeSiteName()
determines the name of the current prototype site. krui_err krui_setFTypeSiteName( char *FType_site_name )
changes the name (and also the site function) of the current prototype site. All units of the net that are derived from this prototype change their site names or site functions. An error code is generated if the new site name is not yet defined.

krui_err krui_createFTypeEntry( char *FType_symbol,char *act_func,
char *out_func, int no_of_sites,
char * *array_of_site_names )
defines the prototype of a unit. If the prototype is supposed to have sites, i.e. no_of_sites > 0, an array of pointers to strings is needed to define the sites. These pointers must point to strings containing the names of the sites. The number of pointers in the arrays must match no_of_sites. An error code is generated if the site names are ambiguous, one or several site names are unknown, the prototype name is ambiguous, or a memory allocation error occurred.

void krui_deleteFTypeEntry( char *FType_symbol )
deletes the specified prototype. If there are still units in the net which are derived from this prototype, they loose their unit type.



next up previous contents index
Next: Functions to Read Up: Kernel Function Interface Previous: Link Functions



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