incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Bachmann-Gmuer <>
Subject Re: Naming Graphs
Date Fri, 20 May 2011 12:23:24 GMT
On Fri, May 20, 2011 at 1:25 PM, Henry Story <> wrote:
> In another thread I wrote:
>>  think it would be interesting to add a method for getting the graph name, btw,
null if there is none
> Equality
> --------
> So as Reto pointed out this could bring up an issue of what the equality criterion of
two graphs are.
> Currently the equality function is inherited from java.util.AbstractCollection which
just verified that all members internally are the same. (Btw, that looks like something one
should be careful about: calculating identity of large graphs seems a bit dangerous)

No, there are different identity criteria for Graphs and MGraphs, look
at their apis. And yes, graph is isomorphism is NP-hard so for big
graphs with many bnodes it may take forever.

> (I think that's why there is a TripleCollection which does not define equality.)
> So there are a few answers one could have.
>  - two graphs are equal if their names are the same
currently a graph has all the names that were ever given to it, that
is any name that was ever given to an isomorphic triple collection
implementing graph.

>  - two graphs are equal if their statements are the same
by that you mean isomorphic?

> With statements based equality it is already clear that that will depend on whether inferencing
is enabled or not, and it could change as more information is available for inferencing.
> I wonder where graph equality is used at all, as it seems like a difficult to define
It is defined very precisely and it is used.

> Use Cases
> ---------
>  From a graph be able to find meta data about it easily: who said it, where when, is
the  current graph up to date?
>  When fetching a graph from TcProvider with methods such as
>  tc.getGraph("")
>  have the returned graph indicate the proper name of the graph where that object is
defined. That makes it easier to automate spiders.
>  (not so sure but as a thought: It could allow for a very strict quasi identity criterion,
that could be easy to calculate:
> two graphs are the same  if
>  the objects are the same
>  or the names are the same and the hashes of all their statements are the same
>  )
the names are the same if and only if the graphs are isomorphic,


> Henry
> Social Web Architect

View raw message