addLinkType [<link-type>]
With no argument, this returns a list of currently defined link types. Otherwise, this creates a new link type of the given name. Link types serve as handles to particular sets of links. Using types, one can selectively randomize, freeze, or delete certain links without affecting others. Types also allow the creation of multiple links between two units. Only one link of a particular type may exist from one unit to another. However, there could be multiple links provided they have distinct types.
A link can only have one type. It is not possible to logically "or" types together when specifying a set of links. A link is given a type when it is created. Most commands that operate on links will accept a type name that will limit its effect to only links of that type. If no type is specified for such a function it will operate on every link, regardless of type.
The only predefined link type is "bias". Bias links that are automatically created when a group is added are of this type. If no type is specified when a connection is formed using connectGroups, connectGroupToUnits, or connectUnits, the default behavior is to give the links a type with the same name as the sending group. This type will be created if necessary. If a different type name is specified when a connection is formed, it too will be created if necessary. Therefore, there is no real reason for this command to exist except for printing out the list of link types.
There can be up to 256 types defined concurrently. It would not be
reasonable to give every link in the network its own type. If the type
is already registered, addLinkType
does not report an error.
To create a new type called "my links":
lens> addLinkType "my links"