C# 클래스 SharpNeat.Decoders.HyperNeat.DefaultNodeSetMappingFunction

Defines a mapping between two node sets based on mapping all source nodes to all target nodes, but with an option to omit mappings where the distance between source and target node is over some threshold. In addition the same nodeset can be passed to the GenerateConnections() method as both source and target. This allows for creating connections between nodes within a layer. The optional max distance still applies and an additional boolean option indicates if the local recurrent connection for each node (from its output back to its input) should be generated.
상속: INodeSetMappingFunction
파일 보기 프로젝트 열기: colgreen/sharpneat

공개 메소드들

메소드 설명
DefaultNodeSetMappingFunction ( double maximumConnectionDistance, bool allowLocalRecurrentConnections ) : System

Construct with the specified maximum connection distance (optional/nullable) and flag indicating if local recurrent connections should be generated when generating connections within a single node set (same source and target nodeset).

GenerateConnections ( SubstrateNodeSet srcNodeSet, SubstrateNodeSet tgtNodeSet ) : IEnumerable

Returns an IEnumerable that yields the mappings/connections defined by the mapping function (from the source nodes to the target nodes) as a sequence. The alternative of returning a list would require a very long list in extreme scenarios; this approach minimizes down memory usage.

GetConnectionCountHint ( SubstrateNodeSet srcNodeSet, SubstrateNodeSet tgtNodeSet ) : int

Returns an estimate/hint for the number of connections that would be created between the provided source and target node sets.

비공개 메소드들

메소드 설명
CalcDistanceSquared ( double srcPos, double tgtPos ) : double

Calculate the Euclidean distance between two points in n-dimensions.

TestNodePair_MaxDistance ( SubstrateNode srcNode, SubstrateNode tgtNode ) : bool
TestNodePair_NullTest ( SubstrateNode srcNode, SubstrateNode tgtNode ) : bool

메소드 상세

DefaultNodeSetMappingFunction() 공개 메소드

Construct with the specified maximum connection distance (optional/nullable) and flag indicating if local recurrent connections should be generated when generating connections within a single node set (same source and target nodeset).
public DefaultNodeSetMappingFunction ( double maximumConnectionDistance, bool allowLocalRecurrentConnections ) : System
maximumConnectionDistance double
allowLocalRecurrentConnections bool
리턴 System

GenerateConnections() 공개 메소드

Returns an IEnumerable that yields the mappings/connections defined by the mapping function (from the source nodes to the target nodes) as a sequence. The alternative of returning a list would require a very long list in extreme scenarios; this approach minimizes down memory usage.
public GenerateConnections ( SubstrateNodeSet srcNodeSet, SubstrateNodeSet tgtNodeSet ) : IEnumerable
srcNodeSet SubstrateNodeSet
tgtNodeSet SubstrateNodeSet
리턴 IEnumerable

GetConnectionCountHint() 공개 메소드

Returns an estimate/hint for the number of connections that would be created between the provided source and target node sets.
public GetConnectionCountHint ( SubstrateNodeSet srcNodeSet, SubstrateNodeSet tgtNodeSet ) : int
srcNodeSet SubstrateNodeSet
tgtNodeSet SubstrateNodeSet
리턴 int