Class ExplicitNeatNodeLayout
java.lang.Object
net.bmahe.genetics4j.neat.spec.ExplicitNeatNodeLayout
- All Implemented Interfaces:
NeatNodeLayout
Node layout with explicitly declared, ordered input and output IDs.
The constructor defensively copies both lists. IDs must be unique, non-negative, disjoint between inputs and outputs, and outside the configured hidden-node range.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longprivate final longFields inherited from interface NeatNodeLayout
MAX_NODE_ID_EXCLUSIVE -
Constructor Summary
ConstructorsConstructorDescriptionExplicitNeatNodeLayout(List<Integer> _inputNodeIds, List<Integer> _outputNodeIds, long _hiddenNodeIdStartInclusive, long _hiddenNodeIdEndExclusive) Creates an explicit node layout. -
Method Summary
Methods inherited from interface NeatNodeLayout
isCompatibleWith, isExternal, isHidden, isInput, isOutput, numInputs, numOutputs
-
Field Details
-
inputNodeIds
-
outputNodeIds
-
-
Constructor Details
-
ExplicitNeatNodeLayout
public ExplicitNeatNodeLayout(List<Integer> _inputNodeIds, List<Integer> _outputNodeIds, long _hiddenNodeIdStartInclusive, long _hiddenNodeIdEndExclusive) Creates an explicit node layout.- Parameters:
_inputNodeIds- input IDs in vector order_outputNodeIds- output IDs in vector order_hiddenNodeIdStartInclusive- inclusive hidden-node range start_hiddenNodeIdEndExclusive- exclusive hidden-node range end- Throws:
NullPointerException- if either external-ID list or one of its elements isnullIllegalArgumentException- if the external IDs or hidden-node range are invalid
-
-
Method Details
-
inputNodeIds
Description copied from interface:NeatNodeLayoutReturns input node IDs in external vector order.- Specified by:
inputNodeIdsin interfaceNeatNodeLayout- Returns:
- an ordered, non-empty list of input node IDs
-
outputNodeIds
Description copied from interface:NeatNodeLayoutReturns output node IDs in external vector order.- Specified by:
outputNodeIdsin interfaceNeatNodeLayout- Returns:
- an ordered, non-empty list of output node IDs
-
hashCode
-
equals
-
toString
-