Class RetePatternMatcher
java.lang.Object
tools.refinery.interpreter.rete.network.BaseNode
tools.refinery.interpreter.rete.network.StandardNode
tools.refinery.interpreter.rete.single.SingleInputNode
tools.refinery.interpreter.rete.single.TransformerNode
tools.refinery.interpreter.rete.matcher.RetePatternMatcher
- All Implemented Interfaces:
IQueryResultProvider
,NetworkStructureChangeSensitiveNode
,Node
,Receiver
,Supplier
,Tunnel
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected IQueryRuntimeContext
protected ReteEngine
protected ProductionNode
protected RecipeTraceInfo
Fields inherited from class tools.refinery.interpreter.rete.single.SingleInputNode
mailbox, parent
Fields inherited from class tools.refinery.interpreter.rete.network.StandardNode
childMailboxes, children
Fields inherited from class tools.refinery.interpreter.rete.network.BaseNode
nodeId, reteContainer, tag, traceInfos
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addUpdateListener
(IUpdateable listener, Object listenerTag, boolean fireNow) void
Connects a new external receiver that will receive update notifications from now on.void
Connects a new external receiver that will receive update notifications from now on.int
Counts the number of occurrences of the pattern that match inputMapping on positions where fixed is true.int
Counts the number of occurrences of the pattern that match inputMapping on positions where fixed is true.int
countMatches
(Object[] parameters) int
countMatches
(TupleMask parameterSeedMask, ITuple parameters) void
disconnect
(Receiver receiver) Disconnects a child node.boolean
disconnectByTag
(Object tag) Disconnects the child node that was connected by specifying the given tag.estimateCardinality
(TupleMask groupMask, Accuracy requiredAccuracy) getAllMatches
(Object[] parameters) getAllMatches
(TupleMask parameterSeedMask, ITuple parameters) getInternalIndexer
(TupleMask mask) getOneArbitraryMatch
(Object[] parameters) getOneArbitraryMatch
(TupleMask parameterSeedMask, ITuple parameters) boolean
boolean
int
projectionSize
(TupleMask groupMask) Counts the number of distinct tuples attainable from the match set by projecting match tuples according to the given mask.void
removeUpdateListener
(Object listenerTag) protected Tuple
Methods inherited from class tools.refinery.interpreter.rete.single.TransformerNode
pullInto, pullIntoWithTimeline, update
Methods inherited from class tools.refinery.interpreter.rete.single.SingleInputNode
appendParent, assignTraceInfo, getCommunicationTracker, getMailbox, getParents, instantiateMailbox, propagatePullInto, propagatePullIntoWithTimestamp, removeParent
Methods inherited from class tools.refinery.interpreter.rete.network.StandardNode
appendChild, constructIndex, getChildMailboxes, getPulledContents, getReceivers, issueError, networkStructureChanged, propagateUpdate, removeChild
Methods inherited from class tools.refinery.interpreter.rete.network.BaseNode
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCore
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface tools.refinery.interpreter.matchers.backend.IQueryResultProvider
estimateAverageBucketSize
Methods inherited from interface tools.refinery.interpreter.rete.network.Node
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfos, setTag
Methods inherited from interface tools.refinery.interpreter.rete.network.Receiver
batchUpdate
Methods inherited from interface tools.refinery.interpreter.rete.network.Supplier
appendChild, constructIndex, getPulledContents, getPulledContents, getReceivers, removeChild
-
Field Details
-
engine
-
context
-
productionNode
-
productionNodeTrace
-
posMapping
-
taggedChildren
-
connected
protected boolean connected
-
-
Constructor Details
-
RetePatternMatcher
- Parameters:
productionNode
- a production node that matches this pattern without any parameter bindings
-
-
Method Details
-
getProductionNode
- Since:
- 1.6
-
matchAll
- Since:
- 2.0
-
matchAll
- Since:
- 2.0
-
matchOne
- Since:
- 2.0
-
matchOne
- Since:
- 2.0
-
count
Counts the number of occurrences of the pattern that match inputMapping on positions where fixed is true.- Returns:
- the number of occurrences
-
count
Counts the number of occurrences of the pattern that match inputMapping on positions where fixed is true.- Returns:
- the number of occurrences
- Since:
- 1.7
-
projectionSize
Counts the number of distinct tuples attainable from the match set by projecting match tuples according to the given mask.- Returns:
- the size of the projection
- Since:
- 2.1
-
connect
Connects a new external receiver that will receive update notifications from now on. The receiver will practically connect to the production node, the added value is unwrapping the updates for external use.- Parameters:
synchronize
- if true, the contents of the production node will be inserted into the receiver after the connection is established.
-
connect
Connects a new external receiver that will receive update notifications from now on. The receiver will practically connect to the production node, the added value is unwrapping the updates for external use. The external receiver will be disconnectable later based on its tag.- Parameters:
tag
- an identifier to recognize the child node by.synchronize
- if true, the contents of the production node will be inserted into the receiver after the connection is established.
-
disconnect
Disconnects a child node. -
disconnectByTag
Disconnects the child node that was connected by specifying the given tag.- Returns:
- if a child node was found registered with this tag.
-
transform
- Specified by:
transform
in classTransformerNode
-
hasMatch
- Specified by:
hasMatch
in interfaceIQueryResultProvider
-
hasMatch
- Specified by:
hasMatch
in interfaceIQueryResultProvider
-
countMatches
- Specified by:
countMatches
in interfaceIQueryResultProvider
-
countMatches
- Specified by:
countMatches
in interfaceIQueryResultProvider
-
estimateCardinality
- Specified by:
estimateCardinality
in interfaceIQueryResultProvider
-
getOneArbitraryMatch
- Specified by:
getOneArbitraryMatch
in interfaceIQueryResultProvider
-
getOneArbitraryMatch
- Specified by:
getOneArbitraryMatch
in interfaceIQueryResultProvider
-
getAllMatches
- Specified by:
getAllMatches
in interfaceIQueryResultProvider
-
getAllMatches
- Specified by:
getAllMatches
in interfaceIQueryResultProvider
-
getQueryBackend
- Specified by:
getQueryBackend
in interfaceIQueryResultProvider
-
addUpdateListener
- Specified by:
addUpdateListener
in interfaceIQueryResultProvider
-
removeUpdateListener
- Specified by:
removeUpdateListener
in interfaceIQueryResultProvider
-
getInternalIndexer
-