Method | Description | |
---|---|---|
ConnectionGeneListBuilder ( int connectionCapacity ) : System.Collections.Generic |
Constructs the builder with the provided capacity. The capacity should be chosen to limit the number of memory re-allocations that occur within the contained connection list dictionary.
|
|
IsConnectionCyclic ( uint srcNeuronId, uint tgtNeuronId ) : bool |
Tests if adding the specified connection would cause a cyclic pathway in the network connectivity. Returns true if the connection would form a cycle. Note. This same logic is implemented on NeatGenome.IsConnectionCyclic() but against slightly different data structures, hence the method is re-implemented here.
|
|
TryAddGene ( |
Add a ConnectionGene to the builder, but only if the connection is not already present (as determined by it's neuron ID endpoints).
|
public ConnectionGeneListBuilder ( int connectionCapacity ) : System.Collections.Generic | ||
connectionCapacity | int | |
return | System.Collections.Generic |
public IsConnectionCyclic ( uint srcNeuronId, uint tgtNeuronId ) : bool | ||
srcNeuronId | uint | |
tgtNeuronId | uint | |
return | bool |
public TryAddGene ( |
||
connectionGene | The connection to add. | |
parentGenome | NeatGenome | The connection's parent genome. This is used to obtain NeuronGene(s) for the connection endpoints. |
overwriteExisting | bool | A flag that indicates if this connection should take precedence over an existing connection with /// the same endpoints. |
return | void |