public static boolean inSubNetwork(RightInputAdapterNode riaNode, LeftTupleSource leftTupleSource) {
        LeftTupleSource startTupleSource = riaNode.getStartTupleSource();
        LeftTupleSource parent = riaNode.getLeftTupleSource();

        while (parent != startTupleSource) {
            if (parent == leftTupleSource) {
                return true;
            }
            parent = parent.getLeftTupleSource();
        }

        return false;
    }
public static boolean inSubNetwork ( RightInputAdapterNode riaNode , LeftTupleSource leftTupleSource ) { LeftTupleSource startTupleSource = riaNode . getStartTupleSource ( ) ; LeftTupleSource parent = riaNode . getLeftTupleSource ( ) ; while ( parent != startTupleSource ) { if ( parent == leftTupleSource ) { return true ; } parent = parent . getLeftTupleSource ( ) ; } return false ; }
Is the LeftTupleSource a node in the sub network for the RightInputAdapterNode
To be in the same network, it must be a node is after the two output of the parent
and before the rianode.