Return-Path: Delivered-To: apmail-incubator-hama-dev-archive@minotaur.apache.org Received: (qmail 33575 invoked from network); 21 Oct 2009 05:14:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Oct 2009 05:14:22 -0000 Received: (qmail 33849 invoked by uid 500); 21 Oct 2009 05:14:22 -0000 Delivered-To: apmail-incubator-hama-dev-archive@incubator.apache.org Received: (qmail 33810 invoked by uid 500); 21 Oct 2009 05:14:22 -0000 Mailing-List: contact hama-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hama-dev@incubator.apache.org Delivered-To: mailing list hama-dev@incubator.apache.org Received: (qmail 33790 invoked by uid 99); 21 Oct 2009 05:14:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 05:14:22 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 05:14:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 75D4E234C1EE for ; Tue, 20 Oct 2009 22:13:59 -0700 (PDT) Message-ID: <595589217.1256102039481.JavaMail.jira@brutus> Date: Wed, 21 Oct 2009 05:13:59 +0000 (UTC) From: "Edward J. Yoon (JIRA)" To: hama-dev@incubator.apache.org Subject: [jira] Updated: (HAMA-190) Bug in Matrix-Vector multiplication In-Reply-To: <1850492437.1252546797597.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HAMA-190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Edward J. Yoon updated HAMA-190: -------------------------------- Resolution: Fixed Status: Resolved (was: Patch Available) It was committed. > Bug in Matrix-Vector multiplication > ----------------------------------- > > Key: HAMA-190 > URL: https://issues.apache.org/jira/browse/HAMA-190 > Project: Hama > Issue Type: Bug > Components: matrix > Affects Versions: 0.1.0 > Reporter: Edward J. Yoon > Assignee: Edward J. Yoon > Fix For: 0.1.0 > > Attachments: HAMA-190.patch > > > Hi again, > Since I've more complex operations, (such as multiply, inverse, load...) I decided coding instead of use the shell. > I've wrote simple example to multiple 2 matrixes, and got incorrect results, can you let me know if I've some mistake, or it's well known bug. > A = 1,2 > 3,4 > B = 1 > 2 > The result should be (C = A * B): > C = 5 > 11 > But I got incorrect results from the example below: > 1.0,2.0 > 3.0,6.0 > The code: > public static void main(String[] args) throws IOException { > conf.set("hbase.rootdir", "hdfs://lb-emu-2:54310/hbase"); > conf.set("hbase.master", "lb-emu-2:60000"); > conf.set("mapred.jar", "/app/installs/hama/hama-0.1.0-dev.jar"); > DenseMatrix a = new DenseMatrix(conf, "A", true); > a.setDimension(2, 2); > a.set(0, 0, 1); > a.set(0, 1, 2); > a.set(1, 0, 3); > a.set(1, 1, 4); > DenseMatrix b = new DenseMatrix(conf, "B", true); > b.setDimension(2, 1); > b.set(0, 0, 1); > b.set(0, 1, 2); > DenseMatrix c = a.mult(b); > for (int i = 0; i < c.getRows(); i++) { > for (int j = 0; j < c.getColumns(); j++) { > System.out.print(c.get(i, j) + " "); > } > System.out.println(""); > } > } > Thanks again, > Nir. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.