Closed RubenVerborgh closed 4 years ago
(Sorry for the late reply. I am on vacation.)
My short answer is: increment the size by one.
For the longer, more detailed answer, recall that an RDF graph is a set of RDF triples. Therefore, as with any other type of sets, the cardinality of such a set is simply the number of elements that are contained in the set. In other words, the cardinality of an RDF graph is the number of RDF triples that the graph contains, no matter whether any of these triples is a nested triple (i.e., has another RDF triple at its subject position or its object position) or not. For instance, consider an RDF graph G = {t} with t=(t',p,o) where t' is another RDF* triple and p and o are URIs. The cardinality of G is 1 because G contains only one (nested) triple, namely t.
Of course, you may say that there are two RDF triples that are mentioned in G, namely t and t'. So, you may want to define the "size" of G to be 2. However, in the context of sets, the terms "size" and cardinality are typically used synonymous; so, it would be strange for RDF graphs to have their "size" being something else than their cardinality.
On a related note, we currently have two different modes of usage of RDF that are under discussion: the SA mode and the PG mode. It is an open question which of them will be defined in the future spec of RDF. The reason why I mention these modes here is because the are different in terms of the number of statements that are considered to be asserted by an RDF* graph. For instance, under SA mode, the aforementioned example graph asserts a single statement only, whereas under PG mode, it asserts two statements.
Thanks so much, @hartig!
Via @simonvb:
Would be interested in particular in @hartig's take on this