You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commonsrdf.apache.org by Stian Soiland-Reyes <st...@apache.org> on 2015/11/03 01:21:59 UTC

Re: [jira] [Commented] (COMMONSRDF-17) Size method

I'm -0 on long size(), but if the two of us are the only ones with a
current opinions we can close as Won't Fix.
On 27 Oct 2015 11:18, "Sergio Fernández (JIRA)" <ji...@apache.org> wrote:

>
>     [
> https://issues.apache.org/jira/browse/COMMONSRDF-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14976153#comment-14976153
> ]
>
> Sergio Fernández commented on COMMONSRDF-17:
> --------------------------------------------
>
> I agree on trying to solve this; but sorry, my opinion stays with using
> {{Graph.size(): long}} as the best choice.
>
> > Size method
> > -----------
> >
> >                 Key: COMMONSRDF-17
> >                 URL: https://issues.apache.org/jira/browse/COMMONSRDF-17
> >             Project: Apache Commons RDF
> >          Issue Type: Improvement
> >            Reporter: Reto Gmür
> >
> > The size method is problematic for two reasons:
> > - it is incompatible with the Collections-API, implementations cannot at
> the same time implement Collection<Triple> (even though a Graph is a
> collection of triples).
> > - With some types of implementations calculating the exact size of a
> graph can be very expensive and often the client just requires an
> approximate size
> > So I propose to replace the size method with the following
> > [- size: int: same as in Collection.size (returns Integer.MAX_VALUE for
> bigger graphs) ]
> > - exactSize: long: the exact size
> > - approximateSize: long: the approximate size
> > For all but exactSize the interface can provide default implementations.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
>