Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 739A37718 for ; Sun, 11 Dec 2011 22:51:10 +0000 (UTC) Received: (qmail 33978 invoked by uid 500); 11 Dec 2011 22:51:08 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 33830 invoked by uid 500); 11 Dec 2011 22:51:08 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 33556 invoked by uid 99); 11 Dec 2011 22:51:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Dec 2011 22:51:08 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Dec 2011 22:51:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id ED7D110D3A9 for ; Sun, 11 Dec 2011 22:50:39 +0000 (UTC) Date: Sun, 11 Dec 2011 22:50:39 +0000 (UTC) From: "Dusan Ku (Issue Comment Edited) (JIRA)" To: issues@commons.apache.org Message-ID: <1882403069.63119.1323643839974.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <2065938273.31017.1322748400203.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Issue Comment Edited] (MATH-717) A varied class of Array2DRowRealMatrix is needed to contain float type instead of double. 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/MATH-717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167233#comment-13167233 ] Dusan Ku edited comment on MATH-717 at 12/11/11 10:48 PM: ---------------------------------------------------------- It is very natural to have very large matrices in mathematical programmings. In many of my experiments, usually linear programming, this happens frequently. If you're not sure of the potential problem between float and double, please run the below samples separately under the following VM option: -Xmx1G #case 1) for float: public static void main(String[] args) { float[][] d = new float[15000][15000]; System.out.println("OK"); } #case 2) for double: public static void main(String[] args) { double[][] d = new double[15000][15000]; System.out.println("OK"); } was (Author: ninedus): It is very natural to have very large matrices in mathematical programming. In many of my experiments, usually linear programming, If you're not sure of the potential problem between float and double, please run the below samples separately under the following VM option: -Xmx1G #case 1) for float: public static void main(String[] args) { float[][] d = new float[15000][15000]; System.out.println("OK"); } #case 2) for double: public static void main(String[] args) { float[][] d = new float[15000][15000]; System.out.println("OK"); } > A varied class of Array2DRowRealMatrix is needed to contain float type instead of double. > ----------------------------------------------------------------------------------------- > > Key: MATH-717 > URL: https://issues.apache.org/jira/browse/MATH-717 > Project: Commons Math > Issue Type: Improvement > Affects Versions: 2.2 > Environment: All > Reporter: Dusan Ku > Labels: features > > The current implementation of Array2DRowRealMatrix takes only double type as its base element value in the matrix. > However, the memory size of double is bigger than float, the downside of which makes the matrix dimension quite limited, compared to float type as its base element type. For small sized problem, this does not make such a big difference, but for large problems, this limits the usability of this library quite severely. In my case, I easily hit an error even after I increase the memory option to 1G. This could have been much more enhanced just by using 'float[][]' instead of the current Array2DRowRealMatrix. > Therefore, the solution I may suggest is to add another class similar to Array2DRowRealMatrix containing float type for its matrix variable instead of double. Of course, a better way is welcome as long as the needs can be fulfilled. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira