- create all the weights needed for a maximum likelihood network (LOCAL)
SYNOPSIS
int create_ml_weights
(net)
ARGUMENTS
NET
*net
The NET structure, already containing
the units and links.
RETURNS
TRUE in case of an error, FALSE in case of success.
FUNCTION
This function supposes that net already has a double linked list of UNIT
structures attached (see create_ml_units), connected by LINK
structures. It traverses all units, and for each unit, all its InLinks.
To each of these links, a WEIGHT structure is attached (allocated using
malloc_weight), of which the WeightId is set, the WeightFlag is set
to VARWEIGHT and the twin link is attached using the get_outlink
function on the UnitId of the unit the link points to.
All weights are put into a linked list and attached to net->FirstWeight.