Lists vs sets of triples in the API: e.g. toRDFGraph

Issue #12 resolved
Doug Burke
repo owner created an issue

From Leif points out

One surprise with Swish.RDF.RDFGraph.toRDFGraph - not a set of triples? Should do (toRDFGraph . nub) to be safe?

which is true. I plan to convert NSGraph to use a set rather than a list but first I want to set up some benchmarks.

Note that the presence of repeated triples may not cause problems (e.g. graphs will still be considered equal) but you can see surprising results; e.g. when using formatGraphAsText or perhaps in some of the query routines (I have not done a thorough audit/check).

Comments (4)

  1. Doug Burke reporter

    The API - and some internal data structures - now use Sets rather than lists (and Maps rather than the home-grown LookuMap/LookupEntryClass code). See c0d6130bebac which will be released as version soon.

  2. Log in to comment