Safe Haskell | None |
---|---|
Language | Haskell98 |
TriplesGraph contains a list-backed graph implementation suitable
for smallish graphs or for temporary graphs that will not be queried.
It maintains the triples in the order that they are given in, and is
especially useful for holding N-Triples, where it is often desirable
to preserve the order of the triples when they were originally parsed.
Duplicate triples are not filtered. If you might have duplicate triples,
use MGraph
instead, which is also more efficient. However, the query
functions of this graph (select, query) remove duplicates from their
result triples (but triplesOf does not) since it is usually cheap
to do so.
- data TList
Documentation
A simple implementation of the RDF
type class that represents
the graph internally as a list of triples.
Note that this type of RDF is fine for interactive
experimentation and querying of smallish (<10,000 triples) graphs,
but there are better options for larger graphs or graphs that you
will do many queries against (e.g., MGraph
is faster for queries).
The time complexity of the functions (where n == num_triples) are: