public abstract class CostStrategyAbstract extends java.lang.Object implements CostStrategy
Modifier and Type | Field and Description |
---|---|
protected CostStrategyConfiguration |
csConfig |
protected static int |
STRUCTURE_MAX_FLAT |
Constructor and Description |
---|
CostStrategyAbstract() |
Modifier and Type | Method and Description |
---|---|
protected abstract int |
getCost(ENode sourceNode,
ENode targetNode,
MatchMapping mapping) |
CostStrategyConfiguration |
getCostConfiguration() |
protected abstract int |
getCostNoMatch(ENode nodeById,
MatchMapping mapping) |
int |
getTotalCost(EGraph source,
EGraph target,
MatchMapping mapping)
Main cost function.
|
int |
getWeightedCostNoMatch(java.lang.Integer nodeId,
EGraph NodeGraph,
MatchMapping mapping) |
int |
getWeightedCostOfGlobalStructure(java.lang.Integer sourceId,
java.lang.Integer targetId,
MatchMapping mapping) |
int |
getWeightedCostofMatchedPair(java.lang.Integer sourceId,
java.lang.Integer targetId,
MatchMapping mapping) |
void |
setCostConfiguration(CostStrategyConfiguration config) |
protected static final int STRUCTURE_MAX_FLAT
protected CostStrategyConfiguration csConfig
protected abstract int getCost(ENode sourceNode, ENode targetNode, MatchMapping mapping)
protected abstract int getCostNoMatch(ENode nodeById, MatchMapping mapping)
public int getTotalCost(EGraph source, EGraph target, MatchMapping mapping)
CostStrategy
getTotalCost
in interface CostStrategy
source
- The nodes of the source graph are the domain of the mappingtarget
- The nodes of the target graph are the range of the mappingmapping
- The COMPLETE mapping between between the nodes of the two graphspublic int getWeightedCostofMatchedPair(java.lang.Integer sourceId, java.lang.Integer targetId, MatchMapping mapping)
getWeightedCostofMatchedPair
in interface CostStrategy
public int getWeightedCostNoMatch(java.lang.Integer nodeId, EGraph NodeGraph, MatchMapping mapping)
getWeightedCostNoMatch
in interface CostStrategy
public int getWeightedCostOfGlobalStructure(java.lang.Integer sourceId, java.lang.Integer targetId, MatchMapping mapping)
getWeightedCostOfGlobalStructure
in interface CostStrategy
public void setCostConfiguration(CostStrategyConfiguration config)
setCostConfiguration
in interface CostStrategy
public CostStrategyConfiguration getCostConfiguration()
getCostConfiguration
in interface CostStrategy