isInputNode method
Returns true
if target
is an input of this node.
Implementation
bool isInputNode(Node<T> target) {
if (this == target) return false;
var graphWalker = GraphWalker<T>(
stopMatcher: NodeEquals<T>(target.value),
);
return graphWalker.walkByNodes<bool>(
[this],
outputsProvider: (step, node) => node._inputs,
process: (step) =>
step.node == target ? GraphWalkingInstruction.result(true) : null,
) ??
false;
}