mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: Taste-GenericItemBasedRecommender
Date Sun, 13 Dec 2009 21:31:54 GMT
Duh.  Simplest approach wins!

On Sun, Dec 13, 2009 at 1:25 PM, Jake Mannix <jake.mannix@gmail.com> wrote:

> > Following up on Jake's comment, could we have a marker interface that
> > indicates a function maps 0 to 0?  The abstract vector and matrix
> > implementations could use instanceOf to decide what to do.
> >
>
> I tried this when I was still trying to contribute to commons-math, but
> realized
> after several patch iterations that it's actually far easier to just do
> this:
>
>    Iterator<Element> e = (f.apply(0) == 0) ? iterateNonZero() :
> iterateAll();
>



-- 
Ted Dunning, CTO
DeepDyve

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message