public class MatchMappingImpl extends java.lang.Object implements MatchMapping
Constructor and Description |
---|
MatchMappingImpl(EGraph source,
EGraph target) |
Modifier and Type | Method and Description |
---|---|
void |
addMatch(ENode sourceNode,
ENode targetNode)
This function add a mapping between the sourceNode and the targetNode.
|
void |
addMatchByIds(int newId,
int targetNodeId) |
void |
clone(MatchMapping mapping) |
int |
getCost() |
java.util.Map<java.lang.Integer,java.lang.Integer> |
getMap() |
java.util.Set<java.util.Map.Entry<java.lang.Integer,java.lang.Integer>> |
getMatchs() |
java.util.Collection<java.lang.Integer> |
getRang() |
EGraph |
getSourceGraph() |
java.lang.Integer |
getSourceNodeIdMappedTo(int targetNodeId)
This function returns the id of source node that is mapped to the input targetNodeId.
|
java.util.Set<java.lang.Integer> |
getSourcesToNull() |
EGraph |
getTargetGraph() |
java.lang.Integer |
getTargetNodeIdMappedTo(int sourceNodeId) |
java.util.Set<java.lang.Integer> |
getTargetToNull() |
boolean |
inDomain(int sourceNodeId) |
boolean |
inRange(int targetNodeId) |
void |
inverse() |
void |
removeMatch(ENode source,
ENode target) |
void |
setCost(int cost) |
void |
setSourceGraph(EGraph graph) |
void |
setTargetGraph(EGraph graph) |
public void inverse()
inverse
in interface MatchMapping
public void addMatch(ENode sourceNode, ENode targetNode)
MatchMapping
addMatch
in interface MatchMapping
public void setTargetGraph(EGraph graph)
setTargetGraph
in interface MatchMapping
public void setSourceGraph(EGraph graph)
setSourceGraph
in interface MatchMapping
public java.util.Collection<java.lang.Integer> getRang()
public java.lang.Integer getSourceNodeIdMappedTo(int targetNodeId)
MatchMapping
getSourceNodeIdMappedTo
in interface MatchMapping
public void addMatchByIds(int newId, int targetNodeId)
public void removeMatch(ENode source, ENode target)
removeMatch
in interface MatchMapping
public void clone(MatchMapping mapping)
clone
in interface MatchMapping
public java.util.Set<java.util.Map.Entry<java.lang.Integer,java.lang.Integer>> getMatchs()
getMatchs
in interface MatchMapping
public java.util.Set<java.lang.Integer> getSourcesToNull()
getSourcesToNull
in interface MatchMapping
public java.util.Set<java.lang.Integer> getTargetToNull()
getTargetToNull
in interface MatchMapping
public java.util.Map<java.lang.Integer,java.lang.Integer> getMap()
getMap
in interface MatchMapping
public int getCost()
getCost
in interface MatchMapping
public void setCost(int cost)
setCost
in interface MatchMapping
public java.lang.Integer getTargetNodeIdMappedTo(int sourceNodeId)
getTargetNodeIdMappedTo
in interface MatchMapping
public EGraph getSourceGraph()
getSourceGraph
in interface MatchMapping
public EGraph getTargetGraph()
getTargetGraph
in interface MatchMapping
public boolean inDomain(int sourceNodeId)
inDomain
in interface MatchMapping
public boolean inRange(int targetNodeId)
inRange
in interface MatchMapping