The Complete SPRLIB & ANNLIB

create_map

- fill one MAP structure (LOCAL)

SYNOPSIS

int create_map (map, recipe, layer_flag)

ARGUMENTS

MAP *map A pointer to the MAP structure to be filled.
MAP_RECIPE recipe The recipe for the creation of map.
long layer_flag Necessary for the determination of the unit name fields.

RETURNS

TRUE if an error occured, FALSE if not.

FUNCTION

This function is used to fill in default values in the map and allocate and fill the UNIT structures in map. The MapName field is filled using DFLT_MAP_TEXT and layernames (see SHAREDNET-constants). The MapId field is given the correct value using the map_count counter (see SHAREDNET-variables). NumUnits is calculated as SizeX times SizeY; the rest of the fields is copied from the recipe. The Mask field is allocated as a matrix of FilterSizeX by FilterSizeY integers, each integer representing an index into the set of weights to be created by connect_maps. Finally, all units are allocated and filled using the create_unit routine, and links to the linked list are given in the FirstUnit and LastUnit field.

NOTE

This function is called by create_layer.

SEE ALSO

create_sharednet

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