public abstract class AbstractOperator extends Object implements MDDOperator
The main method for two-way merge is not implemented here and is the only requirement for implementors.
To properly support multiple merge, implementors are encouraged to override
multiple_leaves(MDDManager, int[])
and recurse_multiple(MDDManager, int[], int, int).
MDDBaseOperators,
AbstractFlexibleOperator| Constructor and Description |
|---|
AbstractOperator()
Create an operator which does not support multiple merge.
|
AbstractOperator(boolean multipleMerge)
Create an operator.
|
| Modifier and Type | Method and Description |
|---|---|
int |
combine(MDDManager ddmanager,
int[] nodes)
Apply this operation to a set of nodes.
|
protected int |
multiple_leaves(MDDManager ddmanager,
int[] leaves)
Get the result of a multiple merge when only leaves are left.
|
protected int |
recurse_multiple(MDDManager ddmanager,
int[] nodes,
int leafcount,
MDDVariable bestVar)
The recursive part of the multiple merge.
|
int |
recurse(MDDManager ddmanager,
NodeRelation status,
int first,
int other)
Common logic for recursive operation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcombinepublic AbstractOperator()
public AbstractOperator(boolean multipleMerge)
multipleMerge - if true, optimised multiple merge will be used instead of the fallbackpublic int recurse(MDDManager ddmanager, NodeRelation status, int first, int other)
combine(MDDManager, int, int).ddmanager - status - first - other - public int combine(MDDManager ddmanager, int[] nodes)
combine in interface MDDOperatorddmanager - the MDD manager in which the nodes are storednodes - the roots of the MDDs to combineprotected int multiple_leaves(MDDManager ddmanager, int[] leaves)
A series of two-nodes merges is performed as fallback.
ddmanager - leaves - protected int recurse_multiple(MDDManager ddmanager, int[] nodes, int leafcount, MDDVariable bestVar)
ddmanager - nodes - leafcount - bestVar - Copyright © 2009–2020. All rights reserved.