Package moss

Class MaxComSub

java.lang.Object
moss.MaxComSub

public class MaxComSub extends Object
Class for finding maximum common subgraphs.
Since:
2006.11.19
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    the costs of the best sequence of edit operations transforming graph 1 into graph 2
    protected int[]
    the mapping of the edges of graph 1 to graph 2
    protected Graph
    the first graph of the pair for which to find the maximum common subgraph
    protected Graph
    the second graph of the pair for which to find the maximum common subgraph
    protected 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
    Constructor
    Description
    Find the maximum common subgraph of two given graphs.
    MaxComSub(Graph g1, Graph g2, boolean byNode)
    Find the maximum common subgraph of two given graphs.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    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.
    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(String[] args)
    Main function for basic testing basic functionality.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • g1

      protected Graph g1
      the first graph of the pair for which to find the maximum common subgraph
    • g2

      protected Graph g2
      the second graph of the pair for which to find the maximum common subgraph
    • costs

      protected int costs
      the costs of the best sequence of edit operations transforming graph 1 into graph 2
    • nodemap

      protected int[] nodemap
      the mapping of the nodes of graph 1 to graph 2
    • edgemap

      protected int[] edgemap
      the mapping of the edges of graph 1 to graph 2
    • mcs

      protected Graph mcs
      the found maximum common subgraph (created on demand)
  • Constructor Details

    • MaxComSub

      public MaxComSub(Graph g1, Graph g2)
      Find the maximum common subgraph of two given graphs.
      Parameters:
      g1 - the first graph
      g2 - the second graph
      Since:
      2006.11.19 (Christian Borgelt)
    • MaxComSub

      public MaxComSub(Graph g1, Graph g2, boolean byNode)
      Find the maximum common subgraph of two given graphs.
      Parameters:
      g1 - the first graph
      g2 - the second graph
      byNode - 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

      public Graph 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

      public static void main(String[] args)
      Main function for basic testing basic functionality.
      Parameters:
      args - the command line arguments
      Since:
      2006.11.19 (Christian Borgelt)