Return-Path: Delivered-To: apmail-lucene-mahout-dev-archive@minotaur.apache.org Received: (qmail 55525 invoked from network); 2 Apr 2010 14:24:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Apr 2010 14:24:45 -0000 Received: (qmail 83957 invoked by uid 500); 2 Apr 2010 11:38:04 -0000 Delivered-To: apmail-lucene-mahout-dev-archive@lucene.apache.org Received: (qmail 83932 invoked by uid 500); 2 Apr 2010 11:38:04 -0000 Mailing-List: contact mahout-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mahout-dev@lucene.apache.org Delivered-To: mailing list mahout-dev@lucene.apache.org Received: (qmail 83924 invoked by uid 99); 2 Apr 2010 11:38:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 11:38:04 +0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=AWL,FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bimargulies@gmail.com designates 74.125.82.48 as permitted sender) Received: from [74.125.82.48] (HELO mail-ww0-f48.google.com) (74.125.82.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 11:37:57 +0000 Received: by wwb39 with SMTP id 39so296228wwb.35 for ; Fri, 02 Apr 2010 04:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type; bh=Nee/l/KSrkRdcbQVPWfLe38XvPZtuxOto9p+677mXKc=; b=XyP+ewh5wva0Fg7dZclirEDLsn97wHenVgDWfySZyvoq2aToc44KlLQujUN+ft8k59 e87zVY0vxOgiUO4z+6B9Lmo40q490t87bcjqjy3ZY/ih5bx7uoMtwp74xTLPiEudeRpz TR+oDDO0PsBMCoaUZPMI67AdBH0DJDUtWXwOY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ce1+tH2555zc+7TrDxnK+rxADTVUu6+zIUO/qQGh9RGeWNFMpzM4afT2OWSzfIEyAr IRdb0NNQyeAb2GaNm2xVjH6LrdgK1peNaYsUVJFi8vH8RC3esFxZ+6kKgL6bjWXET+19 arNz22D8nK9e+i0UXcq9fF/qY0GId4MITF1tg= MIME-Version: 1.0 Received: by 10.216.179.78 with HTTP; Fri, 2 Apr 2010 04:37:36 -0700 (PDT) In-Reply-To: References: Date: Fri, 2 Apr 2010 07:37:36 -0400 Received: by 10.216.87.16 with SMTP id x16mr1210489wee.27.1270208256523; Fri, 02 Apr 2010 04:37:36 -0700 (PDT) Message-ID: Subject: Re: [collections] and what about 'identity'? From: Benson Margulies To: mahout-dev@lucene.apache.org Content-Type: multipart/alternative; boundary=0016e6dab150ebbd8d04833f6764 --0016e6dab150ebbd8d04833f6764 Content-Type: text/plain; charset=UTF-8 I'm going to code subclasses in my code to get something done before we get to the next Mahout release, and that will give me some practical experience with the whole business. Meanwhile, consider the case of IdentityHashMap. If nothing else, the strategy approach means adding One class to the library, not 6. On Fri, Apr 2, 2010 at 7:35 AM, Sean Owen wrote: > I'm also thinking of the added complexity in the code, and slight > possible performance hit to injecting this level of flexibility. My > gut says it's perhaps questionable, but I base that on nothing but > gut. > > I'm thinking of this versus, in special cases like you mention, just > proceeding with a wrapper or subclass? how bad is that? > > On Fri, Apr 2, 2010 at 12:27 PM, Drew Farris > wrote: > > On Fri, Apr 2, 2010 at 7:01 AM, Sean Owen wrote: > >> What's the use case for needing to vary the hash function? > > > > I was doing something funky with string prefixes the other day and > > could have used something like this baked into collections already. I > > vote for the strategy pattern. > > > --0016e6dab150ebbd8d04833f6764--