Package moss
Class MaxComSub
java.lang.Object
moss.MaxComSub
Class for finding maximum common subgraphs.
- Since:
- 2006.11.19
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
the costs of the best sequence of edit operations transforming graph 1 into graph 2protected int[]
the mapping of the edges of graph 1 to graph 2protected Graph
the first graph of the pair for which to find the maximum common subgraphprotected Graph
the second graph of the pair for which to find the maximum common subgraphprotected Graph
the found maximum common subgraph (created on demand)protected int[]
the mapping of the nodes of graph 1 to graph 2 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getCosts()
Get the costs of the best sequence of edit operations.int[]
Get the mapping of the edges of graph 1 to the edges of graph 2.getGraph()
Get the mapping of the edges of graph 1 to the edges of graph 2.int[]
Get the mapping of the nodes of graph 1 to the nodes of graph 2.static void
Main function for basic testing basic functionality.
-
Field Details
-
g1
the first graph of the pair for which to find the maximum common subgraph -
g2
the second graph of the pair for which to find the maximum common subgraph -
costs
protected int coststhe costs of the best sequence of edit operations transforming graph 1 into graph 2 -
nodemap
protected int[] nodemapthe mapping of the nodes of graph 1 to graph 2 -
edgemap
protected int[] edgemapthe mapping of the edges of graph 1 to graph 2 -
mcs
the found maximum common subgraph (created on demand)
-
-
Constructor Details
-
MaxComSub
Find the maximum common subgraph of two given graphs.- Parameters:
g1
- the first graphg2
- the second graph- Since:
- 2006.11.19 (Christian Borgelt)
-
MaxComSub
Find the maximum common subgraph of two given graphs.- Parameters:
g1
- the first graphg2
- the second graphbyNode
- whether to do the search by node mappings (default: edge mappings)- Since:
- 2006.11.19 (Christian Borgelt)
-
-
Method Details
-
getCosts
public int getCosts()Get the costs of the best sequence of edit operations.- Returns:
- the costs of the best sequence of edit operations
- Since:
- 2006.11.19 (Christian Borgelt)
-
getNodeMap
public int[] getNodeMap()Get the mapping of the nodes of graph 1 to the nodes of graph 2.- Returns:
- the node map (graph index to subgraph index)
- Since:
- 2006.11.19 (Christian Borgelt)
-
getEdgeMap
public int[] getEdgeMap()Get the mapping of the edges of graph 1 to the edges of graph 2.- Returns:
- the edge map (graph index to subgraph index)
- Since:
- 2006.11.19 (Christian Borgelt)
-
getGraph
Get the mapping of the edges of graph 1 to the edges of graph 2.- Returns:
- the maximum common subgraph
- Since:
- 2006.11.19 (Christian Borgelt)
-
main
Main function for basic testing basic functionality.- Parameters:
args
- the command line arguments- Since:
- 2006.11.19 (Christian Borgelt)
-