Return-Path: Delivered-To: apmail-mahout-dev-archive@www.apache.org Received: (qmail 61662 invoked from network); 29 Jan 2011 05:45:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Jan 2011 05:45:09 -0000 Received: (qmail 40669 invoked by uid 500); 29 Jan 2011 05:45:09 -0000 Delivered-To: apmail-mahout-dev-archive@mahout.apache.org Received: (qmail 40528 invoked by uid 500); 29 Jan 2011 05:45:07 -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 40519 invoked by uid 99); 29 Jan 2011 05:45:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Jan 2011 05:45:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Jan 2011 05:45:04 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0T5ih4x006086 for ; Sat, 29 Jan 2011 05:44:43 GMT Message-ID: <23892853.284061296279883346.JavaMail.jira@thor> Date: Sat, 29 Jan 2011 00:44:43 -0500 (EST) From: "Lance Norskog (JIRA)" To: dev@mahout.apache.org Subject: [jira] Updated: (MAHOUT-599) AbstractMatrix uses clone() where it should use like() In-Reply-To: <5195632.284021296279763566.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MAHOUT-599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lance Norskog updated MAHOUT-599: --------------------------------- Attachment: MAHOUT-599.patch > AbstractMatrix uses clone() where it should use like() > ------------------------------------------------------ > > Key: MAHOUT-599 > URL: https://issues.apache.org/jira/browse/MAHOUT-599 > Project: Mahout > Issue Type: Improvement > Components: Math > Reporter: Lance Norskog > Priority: Minor > Fix For: 0.5 > > Attachments: MAHOUT-599.patch > > > The AbstractMatrix.java class uses clone() instead of like() in the methods which create a new matrix and populate it with calculated data. This means that the contents of 'this' is copied into the return matrix, then promptly overwritten. > This patch fixes this problem by substituting like() and changing the code to not rely on having the values of 'this' in the clone. > Also, this allows generated matrices like a random matrix to reuse the code from AbstractMatrix; read-only matrices cannot populate their clones. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.