Class SegmentUtilities


  • public class SegmentUtilities
    extends Object
    • Constructor Detail

      • SegmentUtilities

        public SegmentUtilities()
    • Method Detail

      • nextNodePosMask

        public static long nextNodePosMask​(long nodePosMask)
      • inSubNetwork

        public static boolean inSubNetwork​(RightInputAdapterNode riaNode,
                                           LeftTupleSource leftTupleSource)
        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.
      • isRootNode

        public static boolean isRootNode​(LeftTupleNode node,
                                         TerminalNode removingTN)
        Returns whether the node is the root of a segment. Lians are always the root of a segment. node cannot be null. The result should discount any removingRule. That means it gives you the result as if the rule had already been removed from the network.
      • isTipNode

        public static boolean isTipNode​(LeftTupleNode node,
                                        TerminalNode removingTN)
        Returns whether the node is the tip of a segment. EndNodes (rtn and rian) are always the tip of a segment. node cannot be null. The result should discount any removingRule. That means it gives you the result as if the rule had already been removed from the network.
      • updateNodeTypesMask

        public static int updateNodeTypesMask​(NetworkNode node,
                                              int mask)
      • isSet

        public static boolean isSet​(int mask,
                                    int bit)