The Complete SPRLIB & ANNLIB

fscanf_map

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

SYNOPSIS

MAP *fscanf_map (stream, NumMaps, PrevLayer, LastMap)

ARGUMENTS

FILE *stream A valid file pointer.
long NumMaps The number of maps to be read.
LAYER *PrevLayer A pointer to the layer before the layer the maps to be read are in. This pointer is needed to connect the maps in the right way. If the maps to be read are in the first layer, this pointer should have the value NULL.
MAP **LastMap Returns: pointer to the last map read.

RETURNS

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

FUNCTION

This function is called by fscanf_network to read the maps part of a network file, i.e. the part between MAPBEGIN and MAPEND. See NET-IO-format for the layout of this part. Unlike fscanf_layer, this routine reads the maps for one layer only, so it has to be called for every layer in the network.

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 map 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 map'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_layer

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