I don't claim that an 'end-user' has much business. Just a
class-that-extends. I'll all for your proposed names. Watch out for
'zero' if the 'default' value is in fact configurable.

On Mon, Jun 15, 2009 at 7:54 PM, Sean Owen<sro...@gmail.com> wrote:
> Yeah exactly, not entirely clear why the *caller* should care about
> this; the class should take care of stuff like that.
>
> At least I propose a rename of size() to getNumNonzeroElements() or
> somesuch, and rename of cardinality() to size().
>
> On Tue, Jun 16, 2009 at 12:46 AM, Benson Margulies<bimargul...@gmail.com> 
> wrote:
>> Lets say you have an algorithm in which a vector starts out sparse,
>> but gradually fills in. At some point, you want to give up and switch
>> to an ordinary vector. This came up in Brown and DiPietro's
>> entropy-based bigram information word clustering algorithm, and I
>> think it could come up elsewhere.
>>
>> A more complex class based on what you're doing here would use this
>> value to decide when to give up and use a dense vector instead.
>

Reply via email to