mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jake Mannix <jake.man...@gmail.com>
Subject Re: PlusMult and other functions
Date Fri, 12 Apr 2013 22:15:35 GMT
So we should make sure that we don't bite ourselves with any
primitive <-> object boxing when interfacing nicely with guava...

It should be fine, but there are places where it will not (e.g. passing
a Function<Double, Double> to a Vector.apply() would, if allowed,
probably result in a lot of ephemeral object creation)



On Fri, Apr 12, 2013 at 4:55 AM, Dan Filimon <dangeorge.filimon@gmail.com>wrote:

> I'm adding interfaces for DoubleDoubleFunctions with the following special
> properties:
> f(x, 0) = x for any x
> f(0, y) = 0 for any y
> so that we can speed up sparse vector operations in these cases [1].
>
> Doing this, I'm also updating the existing functions in Functions.java to
> support the new interfaces where appropriate.
>
> I'm seeing some functions use the PlusMult class (subtraction notably) and
> there seem to be lots of unused functions.
> Also, these functions don't implement Guava's Function interface making
> interfacing with Guava difficult in new code.
>
> Is this just a case of this being older less cleaned-up code, or are there
> reasons for this design?
> If it's the former, would anyone be willing to have a look and do some
> refactoring? Or, maybe add this as a started issue for GSOC students? :)
>
> [1] https://issues.apache.org/jira/browse/MAHOUT-1190
>



-- 

  -jake

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