E
- public class AlphaPlusPlusTh1Th2NodeExpanderImproved1Impl<E> extends java.lang.Object implements org.processmining.framework.util.search.NodeExpander<AlphaPairImpl<Union<E>,Union<E>>>
Constructor and Description |
---|
AlphaPlusPlusTh1Th2NodeExpanderImproved1Impl(org.processmining.logabstractions.models.CausalAbstraction<E> cra,
org.processmining.logabstractions.models.UnrelatedAbstraction<E> ua,
org.processmining.logabstractions.models.LongTermFollowsAbstraction<E> ltfa,
java.util.Collection<E> ignore) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canExpandLeft(E e,
AlphaPairImpl<Union<E>,Union<E>> toExpand) |
protected boolean |
canExpandRight(E e,
AlphaPairImpl<Union<E>,Union<E>> toExpand) |
protected AlphaPairImpl<Union<E>,Union<E>> |
expandLeft(E e,
AlphaPairImpl<Union<E>,Union<E>> toExpand) |
java.util.Collection<AlphaPairImpl<Union<E>,Union<E>>> |
expandNode(AlphaPairImpl<Union<E>,Union<E>> toExpand,
org.processmining.framework.plugin.Progress progress,
java.util.Collection<AlphaPairImpl<Union<E>,Union<E>>> unmodifiableResultCollection)
This method is called by the searcher when a node in the search tree has
to be considered for expansion.
|
protected AlphaPairImpl<Union<E>,Union<E>> |
expandRight(E e,
AlphaPairImpl<Union<E>,Union<E>> toExpand) |
void |
processLeaf(AlphaPairImpl<Union<E>,Union<E>> leaf,
org.processmining.framework.plugin.Progress progress,
java.util.Collection<AlphaPairImpl<Union<E>,Union<E>>> resultCollection)
This method is called by the searcher to which this expander is
registered each time a leaf was encountered.
|
public AlphaPlusPlusTh1Th2NodeExpanderImproved1Impl(org.processmining.logabstractions.models.CausalAbstraction<E> cra, org.processmining.logabstractions.models.UnrelatedAbstraction<E> ua, org.processmining.logabstractions.models.LongTermFollowsAbstraction<E> ltfa, java.util.Collection<E> ignore)
protected AlphaPairImpl<Union<E>,Union<E>> expandLeft(E e, AlphaPairImpl<Union<E>,Union<E>> toExpand)
public java.util.Collection<AlphaPairImpl<Union<E>,Union<E>>> expandNode(AlphaPairImpl<Union<E>,Union<E>> toExpand, org.processmining.framework.plugin.Progress progress, java.util.Collection<AlphaPairImpl<Union<E>,Union<E>>> unmodifiableResultCollection)
org.processmining.framework.util.search.NodeExpander
expandNode
in interface org.processmining.framework.util.search.NodeExpander<AlphaPairImpl<Union<E>,Union<E>>>
toExpand
- The node to expand.progress
- The progress indicator provided to the searcher in which this
expander is registered. The expander may increment the
progress, but it should check for cancellation, especially
when doing long computations.unmodifiableResultCollection
- the leafs of the search space that have been added to the
resultCollection by the processLeaf method. Note that any
access to this collection should be synchronized and this
collection should not be modified in this method. However the
provided collection is modifiable, as for synchronization
purposes, the actual resultCollection is provided.protected AlphaPairImpl<Union<E>,Union<E>> expandRight(E e, AlphaPairImpl<Union<E>,Union<E>> toExpand)
public void processLeaf(AlphaPairImpl<Union<E>,Union<E>> leaf, org.processmining.framework.plugin.Progress progress, java.util.Collection<AlphaPairImpl<Union<E>,Union<E>>> resultCollection)
org.processmining.framework.util.search.NodeExpander
synchronized(resultCollection) {
resultCollection.add(leaf);
}
However, more advanced implementations are possible.
Finally, note that calls to this method are not thread-safe, i.e. the
implementing class should take care of synchronization on the
resultCollection if necessary (as in the example above).processLeaf
in interface org.processmining.framework.util.search.NodeExpander<AlphaPairImpl<Union<E>,Union<E>>>
leaf
- The node that was found to be a leaf by the expandNode method
(i.e. the expandNode method returned and empty collection)progress
- The progress indicator provided to the searcher in which this
expander is registered. The expander may increment the
progress, but it should check for cancellation, especially
when doing long computations.resultCollection
- The collection to which to add the leaf node. More advanced
computations are allowed here, i.e. the resultCollection can
be changed. Note however that this requires syncrhonization on
the collection, as calls to this method are not thread-safe.