updateRiaAndTerminalMemory(++pos, ( LeftTupleSource ) sink, originalLt, smem, wm);
} else if ( sink.getType() == NodeTypeEnums.RightInputAdaterNode) {
// Only add the RIANode, if the LeftTupleSource is part of the RIANode subnetwork.
if ( inSubNetwork( (RightInputAdapterNode)sink, originalLt ) ) {
RiaNodeMemory riaMem = ( RiaNodeMemory) wm.getNodeMemory( (MemoryFactory) sink );
RuleMemory rmem = ( RuleMemory ) riaMem.getRiaRuleMemory();
smem.getRuleMemories().add( rmem );
rmem.getSegmentMemories()[smem.getPos()] = smem;
}
} else if ( NodeTypeEnums.isTerminalNode( sink) ) {
RuleMemory rmem = ( RuleMemory ) wm.getNodeMemory( (MemoryFactory) sink );
smem.getRuleMemories().add( rmem );
rmem.getSegmentMemories()[smem.getPos()] = smem;
}
}
}