The Complete SPRLIB & ANNLIB

fscanf_layer

- load the layers part of a network file (LOCAL)

SYNOPSIS

LAYER *fscanf_layer (stream, NumLayers, LastLayer)

ARGUMENTS

FILE *stream A valid file pointer.
long NumLayers The number of layers to be read.
LAYER **LastLayer Returns: pointer to the last layer read.

RETURNS

A pointer to the first of a linked list of LAYER structures if successful, NULL in case of an error. A pointer to the last element of this linked list is returned through the LastLayer pointer.

FUNCTION

This function is called by fscanf_network to read the layers part of a network file, i.e. the part between LAYERBEGIN and LAYEREND. See NET-IO-format for the layout of this part.

NOTE

Since layer- and map-information is only stored for shared weights neural networks (having the NET.NetFlag field set to SHAREDNET) this function is only called when the NetFlag field has that value. Since at the time of reading the layer information the units are not yet read, the FirstUnit and LastUnit fields cannot be filled. Therefore, the ID's of these units are stored in the layer's SystemData.l and UserData.l fields, respectively. After reading all units, the function get_unit is used to find the pointer to the corresponding UNIT.

SEE ALSO

fscanf_network, fscanf_map

This document was generated using api2html on Thu Mar 5 09:00:00 MET DST 1998