mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Lyubimov <>
Subject Re: Mahout-1539-computation of gaussian kernel between 2 arrays of shapes
Date Thu, 25 Sep 2014 15:34:33 GMT
Scala function literals (or any function literal) derive from a particular
set of traits. It may be java classes are able to implement these traits
(nobody that i know attempted to do that), and then maybe they will become
supported as scala function types. But i think even that is a big if, since
scala compiler tinkers with bytecode a lot, and compatibility at bytecode
level is not guaranteed between scala major releases. Bottom line, even if
it is possible to write scala functions in java, it is definitely not
publicly documented feature.

On the other hand, it is possible to use "function-like" Colt classes such
as DoubleDoubleFunction just like a plain old reference-type object from
either scala or Java, which is exactly how it happens in the example given
in the question originally asked.

On Thu, Sep 25, 2014 at 12:24 AM, Ted Dunning <> wrote:

> On Wed, Sep 24, 2014 at 11:09 PM, Dmitriy Lyubimov <>
> wrote:
> > Aggregate is Colt's thing. Colt (aka Mahout-math) establish java-side
> > concept of different function types which are unfortunately not
> compatible
> > with Scala literals.
> >
> Dmitriy,
> Is this because we have other methods that describe the characteristics of
> the function?
> What would be the Scala friendly idiom?  Additional traits?

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