Return-Path: X-Original-To: apmail-mahout-dev-archive@www.apache.org Delivered-To: apmail-mahout-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D097F17818 for ; Thu, 25 Sep 2014 15:35:06 +0000 (UTC) Received: (qmail 2127 invoked by uid 500); 25 Sep 2014 15:35:05 -0000 Delivered-To: apmail-mahout-dev-archive@mahout.apache.org Received: (qmail 2056 invoked by uid 500); 25 Sep 2014 15:35:05 -0000 Mailing-List: contact dev-help@mahout.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mahout.apache.org Delivered-To: mailing list dev@mahout.apache.org Received: (qmail 2040 invoked by uid 99); 25 Sep 2014 15:35:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Sep 2014 15:35:05 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dlieu.7@gmail.com designates 209.85.214.178 as permitted sender) Received: from [209.85.214.178] (HELO mail-ob0-f178.google.com) (209.85.214.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Sep 2014 15:34:59 +0000 Received: by mail-ob0-f178.google.com with SMTP id va2so8279060obc.37 for ; Thu, 25 Sep 2014 08:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=b38+pPgp1QWr9QcbsmhMXHc8+TWKwdBW+qS71IGYIjg=; b=p90OGjFL4DdYFX11FOcVLdR7Uf5ExT8j4hu6ZCn1eIu802V7scJlulM3QJJWKuHw9E M8mYGTtiIc0xi8RxiauumfoGLc2g5WqNqtkhIkDnbqQd/p7c9ndQdcz7d9z7c6ceGzXZ 5moT2l3BiNL9dDxzpE4IqzMnr1rNhAhw/GfWt5NTNwWheKPagCIS8aKiVSPjE9QIpJPE tBsM3nY1+CTyw4SpCsSL+bzKBp+5RqSkxdTaj1AiuFXDYNLRez+wtNZH6gj6kDiTNVoh V6gBf11uY+VO6c1Rgnao9rY5wySzVFvdJQDjg7uINOMQEvrZ2+8v7RpM2RvQ8tBJfRTl 8Y5w== MIME-Version: 1.0 X-Received: by 10.60.124.130 with SMTP id mi2mr14752759oeb.25.1411659273286; Thu, 25 Sep 2014 08:34:33 -0700 (PDT) Received: by 10.76.122.112 with HTTP; Thu, 25 Sep 2014 08:34:33 -0700 (PDT) In-Reply-To: References: <541B33A7.5060909@gatech.edu> Date: Thu, 25 Sep 2014 08:34:33 -0700 Message-ID: Subject: Re: Mahout-1539-computation of gaussian kernel between 2 arrays of shapes From: Dmitriy Lyubimov To: "dev@mahout.apache.org" Content-Type: multipart/alternative; boundary=047d7b41773b87386f0503e589ad X-Virus-Checked: Checked by ClamAV on apache.org --047d7b41773b87386f0503e589ad Content-Type: text/plain; charset=UTF-8 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? > --047d7b41773b87386f0503e589ad--