org.eclipse.viatra.query.runtime.rete.index

## Class TransitiveClosureNodeIndexer

- java.lang.Object
- - org.eclipse.viatra.query.runtime.rete.network.BaseNode
  - - org.eclipse.viatra.query.runtime.rete.index.StandardIndexer
    - - org.eclipse.viatra.query.runtime.rete.index.TransitiveClosureNodeIndexer

- All Implemented Interfaces:
    java.lang.Iterable<Tuple>, Indexer, IterableIndexer, NetworkStructureChangeSensitiveNode, Node

      public class TransitiveClosureNodeIndexer
      extends StandardIndexer
      implements IterableIndexer

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.rete.index.StandardIndexer

      `mask, parent`

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.rete.network.BaseNode

      `nodeId, reteContainer, tag, traceInfos`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TransitiveClosureNodeIndexer(TupleMask mask, IncSCCAlg<java.lang.Object> tcAlg, TransitiveClosureNode tcNode)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Collection<Tuple>` | `get(Tuple signature)`
    `Receiver` | `getActiveNode()` This indexer will be updated whenever a Rete update is sent to the active node (or an equivalent time slot allotted to it).
    `int` | `getBucketCount()`
    `java.util.Collection<Tuple>` | `getSignatures()` A view consisting of exactly those signatures whose tuple group is not empty
    `java.util.Iterator<Tuple>` | `iterator()`
    `void` | `propagate(Direction direction, Tuple updateElement, boolean change)`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.index.StandardIndexer

      `assignTraceInfo, attachListener, detachListener, getContainer, getListeners, getMask, getParent, networkStructureChanged, propagate, toStringCore`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.network.BaseNode

      `acceptPropagatedTraceInfo, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.rete.index.Indexer

      `attachListener, detachListener, getListeners, getMask, getParent, getTimeline`

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Node

      `acceptPropagatedTraceInfo, assignTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTag`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### TransitiveClosureNodeIndexer

          public TransitiveClosureNodeIndexer(TupleMask mask,
                                              IncSCCAlg<java.lang.Object> tcAlg,
                                              TransitiveClosureNode tcNode)

  - ### Method Detail

    - #### get

          public java.util.Collection<Tuple> get(Tuple signature)

      Specified by:
        `get` in interface `Indexer`
      Returns:
        all stored tuples that conform to the specified signature, null if there are none such. CONTRACT: do not modify!

    - #### getBucketCount

          public int getBucketCount()

      Specified by:
        `getBucketCount` in interface `IterableIndexer`
      Returns:
        the number of signatures whose tuple group is not empty

    - #### getSignatures

          public java.util.Collection<Tuple> getSignatures()

      Description copied from interface: `IterableIndexer`
      A view consisting of exactly those signatures whose tuple group is not empty
      Specified by:
        `getSignatures` in interface `IterableIndexer`

    - #### iterator

          public java.util.Iterator<Tuple> iterator()

      Specified by:
        `iterator` in interface `java.lang.Iterable<Tuple>`

    - #### propagate

          public void propagate(Direction direction,
                                Tuple updateElement,
                                boolean change)

      Since:
        2.4

    - #### getActiveNode

          public Receiver getActiveNode()

      Description copied from interface: `Indexer`
      This indexer will be updated whenever a Rete update is sent to the active node (or an equivalent time slot allotted to it). The active node is typically the indexer itself, but it can be a different node such as its parent.
      Specified by:
        `getActiveNode` in interface `Indexer`
      Returns:
        the active node that operates this indexer