Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-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 602A4D272 for ; Tue, 1 Jan 2013 01:08:27 +0000 (UTC) Received: (qmail 90167 invoked by uid 500); 1 Jan 2013 01:08:26 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 90057 invoked by uid 500); 1 Jan 2013 01:08:26 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 90049 invoked by uid 99); 1 Jan 2013 01:08:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jan 2013 01:08:26 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [193.74.71.27] (HELO eir.is.scarlet.be) (193.74.71.27) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jan 2013 01:08:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scarlet.be; s=scarlet; t=1357002477; bh=9HsiUx+UvbvkI1Rv8sGYZWHQKOj/GJSjGUjDYj9xHeU=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=dIeDSm92i8nTcXh7Q/x4JArmGmsDx109WcZEU0IPDKS0IUyq0+C1qnOkhdO752oNG hSmVxJwzrCuwv+DArxowZ2RXlO4Nc5aYiwT7LPjVsY0U3OMfrhkkcqNPIH3f3HRrxi mFl9jlmBYzP0LtmDosChhIfPE8L0ONUW4kwL0fxw= Received: from mail.harfang.homelinux.org (ip-83-134-183-228.dsl.scarlet.be [83.134.183.228]) by eir.is.scarlet.be (8.14.5/8.14.5) with ESMTP id r0117umi006754 for ; Tue, 1 Jan 2013 02:07:57 +0100 X-Scarlet: d=1357002477 c=83.134.183.228 Received: from localhost (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id C1A1B617F0 for ; Tue, 1 Jan 2013 02:07:56 +0100 (CET) Received: from mail.harfang.homelinux.org ([192.168.20.11]) by localhost (mail.harfang.homelinux.org [192.168.20.11]) (amavisd-new, port 10024) with ESMTP id tqAwBsC9vKly for ; Tue, 1 Jan 2013 02:07:54 +0100 (CET) Received: from dusk.harfang.homelinux.org (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id AACB4617EE for ; Tue, 1 Jan 2013 02:07:54 +0100 (CET) Received: from eran by dusk.harfang.homelinux.org with local (Exim 4.77) (envelope-from ) id 1TpqKg-0007kX-Bm for dev@commons.apache.org; Tue, 01 Jan 2013 02:07:54 +0100 Date: Tue, 1 Jan 2013 02:07:54 +0100 From: Gilles Sadowski To: dev@commons.apache.org Subject: Re: [math] [linear] immutability Message-ID: <20130101010754.GH20126@dusk.harfang.homelinux.org> Mail-Followup-To: dev@commons.apache.org References: <50E1CB9D.4090001@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: Tiny Tux X-PGP-Key-Fingerprint: 53B9 972E C2E6 B93C BEAD 7092 09E6 AF46 51D0 5641 User-Agent: Mutt/1.5.21 (2010-09-15) X-DCC-scarlet.be-Metrics: eir 20001; Body=1 Fuz1=1 Fuz2=1 X-Virus-Scanned: clamav-milter 0.97.1-exp at eir X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org Hi. > > If we stick to > > > > 0) algebraic objects are immutable > > 1) algorithms defined using algebraic concepts should be implemented > > using algebraic objects > > > > ... > > 0) Start, with Konstantin's help, by fleshing out the InPlace > > matrix / vector interface > > 1) Integrate Mahout code as part of a wholesale refactoring of the > > linear package What do you mean by this? Copy/paste or create a dependency? Something else? > > 2) Extend use of the visitor pattern to perform mutations > > "in-place" (similar to 0) in effect) > > As suggested in a previous post: 3) a) Define a new "minimal matrix" interface, and create immutable implementations. b) Benchmark critical methods (entry access, iteration, add, multiply, etc.) c) Quantify the efficiency gain of in-place operations and only when this information is available decide whether the gain is worth the price. [Even if in-place operations are faster in a single thread context, it is not sure that immutability would not change that in a multi-thread implementation. Trying to outperform multi-threaded code with in-place operations is a dead end.] Before embarking on any of this, please identify the rationale: Is there _one_ identified problem that would require urgent action? This discussion about clean-up/improvement/simplification of the CM matrix implementations has been going on for months, and we should not start a "new" discussion without referring to what has been recorded by S�bastien on JIRA. Regards, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org