public abstract class SubgraphEncoding extends BDDEncoding
Note: The concrete implementation of a subgraph encoding can be found in classes extending this abstract class.
DefaultSubgraphEncoding
,
SubgraphAutomaton
BDDEncoding.StateType
Modifier and Type | Method and Description |
---|---|
static SubgraphEncoding |
getDefaultEncoding(int maximumInterface,
int innerInterface,
int outerInterface,
Graph subgraph,
List<Node> nodeOrder,
List<Edge> edgeOrder)
Returns the default BDD encoding for a subgraph instance with a
maximum interface size of
maximumInterface and a wanted
subgraph subgraph . |
abstract RavenBDD |
getEdgeBit(BDDEncoding.StateType type,
int edge)
Returns a BDD which encodes that in state
state the edge -th subgraph edge
has been recognized if and only if the BDD is true . |
int |
getEdgeCount()
Returns the number of edges of the wanted subgraph.
|
List<Edge> |
getEdgeOrder()
Returns the edge order of this encoding.
|
static String |
getEdgeType(int edge)
Returns the type string indicating the existence bits for the
edge -th edge. |
static SubgraphEncoding |
getEncoding(int maximumInterface,
int innerInterface,
int outerInterface,
Graph subgraph,
List<Node> nodeOrder,
List<Edge> edgeOrder,
String encodingName)
Returns the BDD encoding for a subgraph instance given by the class name
name with a maximum interface size of maximumInterface and
a wanted subgraph subgraph If no subgraph encoding with the given
name can be found the default encoding is returned. |
abstract RavenBDD |
getMappingBit(BDDEncoding.StateType type,
int node,
int pos)
Returns a BDD which encodes that in state
state the node -th subgraph node
is the image of pos -th interface node (of the function mapping the interface into
the subgraph node set) if and only if the BDD is true . |
static String |
getMappingType(int node,
int pos)
Returns the type string indicating the bit for the mapping of the
node -th node
to the pos -th interface position. |
abstract RavenBDD |
getNodeBit(BDDEncoding.StateType type,
int node)
Returns a BDD which encodes that in state
state the node -th subgraph node
has been recognized if and only if the BDD is true . |
int |
getNodeCount()
Returns the number of nodes of the wanted subgraph.
|
List<Node> |
getNodeOrder()
Returns the node order of this encoding.
|
static String |
getNodeType(int node)
Returns the type string indicating the existence bits for the
node -th node. |
Graph |
getSubgraph()
Returns the wanted subgraph.
|
getBit, getBitType, getCurrentStateDomain, getInnerInterface, getInterfaceBit, getInterfaceEncodingBDD, getInterfaceLength, getInterfaceSize, getInterfaceSizeIsGreaterOrEqual, getInterfaceSizeIsLessOrEqual, getInterfaceSizeType, getLength, getMaximumInterface, getOuterInterface, getStateBit, getStateEncodingBDD, getStateLength, getStateType, getSuccessorStateDomain, one, printStates, toString, zero
public static final SubgraphEncoding getDefaultEncoding(int maximumInterface, int innerInterface, int outerInterface, Graph subgraph, List<Node> nodeOrder, List<Edge> edgeOrder)
maximumInterface
and a wanted
subgraph subgraph
.maximumInterface
- the maximum interface sizeinnerInterface
- size of the inner interfaceouterInterface
- size of the outer interfacesubgraph
- the wanted subgraphnodeOrder
- the node orderedgeOrder
- the edge orderpublic static final SubgraphEncoding getEncoding(int maximumInterface, int innerInterface, int outerInterface, Graph subgraph, List<Node> nodeOrder, List<Edge> edgeOrder, String encodingName)
name
with a maximum interface size of maximumInterface
and
a wanted subgraph subgraph
If no subgraph encoding with the given
name can be found the default encoding is returned.maximumInterface
- the maximum interface sizeinnerInterface
- size of the inner interfaceouterInterface
- size of the outer interfacesubgraph
- the wanted subgraphnodeOrder
- the node orderedgeOrder
- the edge orderencodingName
- the class name of the subgraph encoding classpublic static final String getEdgeType(int edge)
edge
-th edge.edge
- the position of the edgepublic static final String getNodeType(int node)
node
-th node.node
- the position of the nodepublic static final String getMappingType(int node, int pos)
node
-th node
to the pos
-th interface position.node
- the position of the nodepos
- the position in the interfacepublic abstract RavenBDD getNodeBit(BDDEncoding.StateType type, int node)
state
the node
-th subgraph node
has been recognized if and only if the BDD is true
.type
- the state type, either current state or successor statenode
- the position of the subgraph nodepublic abstract RavenBDD getEdgeBit(BDDEncoding.StateType type, int edge)
state
the edge
-th subgraph edge
has been recognized if and only if the BDD is true
.type
- the state type, either current state or successor stateedge
- the position of the subgraph edgepublic abstract RavenBDD getMappingBit(BDDEncoding.StateType type, int node, int pos)
state
the node
-th subgraph node
is the image of pos
-th interface node (of the function mapping the interface into
the subgraph node set) if and only if the BDD is true
.type
- the state type, either current state or successor statenode
- the position of the subgraph nodepos
- the position of the interface nodepublic final Graph getSubgraph()
public final int getNodeCount()
public final int getEdgeCount()
public final List<Node> getNodeOrder()