/** * Answer true if the given enhanced graph contains the same nodes and * edges as this graph. The default implementation delegates this to the * underlying graph objects. * * @param eg A graph to test * @return True if eg is a graph with the same structure as this. */ final public boolean isIsomorphicWith(EnhGraph eg){ return graph.isIsomorphicWith(eg.graph); }
@Override public boolean isIsomorphicWith(Graph g) { return graph.isIsomorphicWith(g) ; }
@Override public boolean isIsomorphicWith(Graph arg0) { return g.isIsomorphicWith(arg0); }
@Override public boolean isIsomorphicWith( Graph g ) { return base.isIsomorphicWith( g ); }
/** Answer whether or not these two graphs are isomorphic, taking the hidden (reification) statements into account. */ @Override public boolean isIsomorphicWith( Model m ) { Graph L = this.getGraph(); Graph R = m.getGraph(); return L.isIsomorphicWith( R ); }
/** * Return true if the datasets are isomorphic - same names for graphs, graphs isomorphic. */ public static boolean isomorphic(DatasetGraph dataset1, DatasetGraph dataset2) { long x1 = dataset1.size() ; long x2 = dataset2.size() ; if ( x1 >=0 && x1 != x2 ) return false ; boolean b = dataset1.getDefaultGraph().isIsomorphicWith(dataset2.getDefaultGraph()) ; if ( ! b ) return b ; for ( Iterator<Node> iter1 = dataset1.listGraphNodes() ; iter1.hasNext() ; ) { Node gn = iter1.next() ; Graph g1 = dataset1.getGraph(gn) ; Graph g2 = dataset2.getGraph(gn) ; if ( g2 == null ) return false ; if ( ! g1.isIsomorphicWith(g2) ) return false ; } return true ; }
/** * Return true if the datasets are isomorphic - same names for graphs, graphs isomorphic. */ public static boolean isomorphic(DatasetGraph dataset1, DatasetGraph dataset2) { long x1 = dataset1.size() ; long x2 = dataset2.size() ; if ( x1 >=0 && x1 != x2 ) return false ; boolean b = dataset1.getDefaultGraph().isIsomorphicWith(dataset2.getDefaultGraph()) ; if ( ! b ) return b ; for ( Iterator<Node> iter1 = dataset1.listGraphNodes() ; iter1.hasNext() ; ) { Node gn = iter1.next() ; Graph g1 = dataset1.getGraph(gn) ; Graph g2 = dataset2.getGraph(gn) ; if ( g2 == null ) return false ; if ( ! g1.isIsomorphicWith(g2) ) return false ; } return true ; }