Safe Haskell | None |
---|---|
Language | Haskell98 |
A graph implementation mapping (S,P) pairs to O, backed by Map
.
- data SP
Documentation
A map-based graph implementation.
This instance of RDF
is an adjacency map with each subject
mapping to a mapping from a predicate node to to the adjacent nodes
via that predicate.
Given the following triples graph::
(http://example.com/s1,http://example.com/p1,http://example.com/o1) (http://example.com/s1,http://example.com/p1,http://example.com/o2) (http://example.com/s1,http://example.com/p2,http://example.com/o1) (http://example.com/s2,http://example.com/p3,http://example.com/o3)
the in-memory map representation of the triples graph is:
key:(http://example.com/s1,http://example.com/p1), value:[http://example.com/o1,http://example.com/o2]; key:(http://example.com/s1,http://example.com/p2), value:[http://example.com/o1]; key:(http://example.com/s2,http://example.com/p3), value:[http://example.com/o3];