EasyRdf API Documentation
Class

EasyRdf_Isomorphic

class EasyRdf_Isomorphic

Functions for comparing two graphs with each other

Based on rdf-isomorphic.rb by Ben Lavender: https://github.com/ruby-rdf/rdf-isomorphic

Methods

static boolean isomorphic(object $graphA, object $graphB)

Check if one graph is isomorphic (equal) to another graph

static array bijectionBetween(object $graphA, object $graphB)

Returns an associative array of bnode identifiers representing an isomorphic bijection of one EasyRdfGraph to another EasyRdfGraph's blank nodes or null if a bijection cannot be found.

Details

at line 62
static public boolean isomorphic(object $graphA, object $graphB)

Check if one graph is isomorphic (equal) to another graph

For example: $graphA = EasyRdfGraph::newAndLoad('http://example.com/a.ttl'); $graphB = EasyRdfGraph::newAndLoad('http://example.com/b.ttl'); if (EasyRdf_Isomorphic::isomorphic($graphA, $graphB)) print "Equal!";

Parameters

object $graphA EasyRdf_Graph $graphA The first graph to be compared
object $graphB EasyRdf_Graph $graphB The second graph to be compared

Return Value

boolean True if the two graphs are isomorphic

at line 76
static public array bijectionBetween(object $graphA, object $graphB)

Returns an associative array of bnode identifiers representing an isomorphic bijection of one EasyRdfGraph to another EasyRdfGraph's blank nodes or null if a bijection cannot be found.

Parameters

object $graphA EasyRdf_Graph $graphA The first graph to be compared
object $graphB EasyRdf_Graph $graphB The second graph to be compared

Return Value

array bnode mapping from $graphA to $graphB