Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 92330 invoked from network); 1 Dec 2008 22:50:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Dec 2008 22:50:11 -0000 Received: (qmail 37678 invoked by uid 500); 1 Dec 2008 22:50:22 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 37597 invoked by uid 500); 1 Dec 2008 22:50:21 -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 37586 invoked by uid 99); 1 Dec 2008 22:50:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Dec 2008 14:50:21 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ted.dunning@gmail.com designates 209.85.146.176 as permitted sender) Received: from [209.85.146.176] (HELO wa-out-1112.google.com) (209.85.146.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Dec 2008 22:48:52 +0000 Received: by wa-out-1112.google.com with SMTP id m34so1577331wag.10 for ; Mon, 01 Dec 2008 14:49:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=ZTzqiIMmt8fWWulvbyGz78OphPffj5Haqs3A6JIlyAA=; b=OGaByk6DFcfRqi7c+nKxaYuPdN5q4EyEjqLxs/b51PDaZl8ChJZ87tDwD2CqERP1Uw JfrH71Ny9QKIaW+b4uzpfuegHIdr3G45Y01RQLJGVykhDtIIE9/U7tulE99I+F9xvAXs S0ADUCrNrXWyyrgTFsK/NUKAj9S8/ME8UN1Vw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=U/pfVtItJh8UaCrIadTP7b+uXr/FaWwDQv3tnhdfcgi5X4/BUC6/8mypvg5nmKQ0Wr ekyLUcSRBKxcsxsncMWXAAsfYlq23sYnHjI3s9oBgy7Ws0S+c4GVUCNqj55rPXJrAs4V ovhdbmdV+Lx3Bsfc2XpAlNuOEbQmZtGuqWe9I= Received: by 10.114.47.12 with SMTP id u12mr6858900wau.147.1228171770341; Mon, 01 Dec 2008 14:49:30 -0800 (PST) Received: by 10.114.156.2 with HTTP; Mon, 1 Dec 2008 14:49:30 -0800 (PST) Message-ID: Date: Mon, 1 Dec 2008 14:49:30 -0800 From: "Ted Dunning" To: "Commons Developers List" , sujit.pal@comcast.net Subject: Re: [math] patch submitted for commons-math sparse matrix support In-Reply-To: <1228170712.6705.67.camel@pluto.healthline.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_59002_1035338.1228171770332" References: <1228167608.6705.55.camel@pluto.healthline.com> <1228170712.6705.67.camel@pluto.healthline.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_59002_1035338.1228171770332 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline This is often handled by using an offset sparse matrix or vector that is sparse in that only elements different from the offset are stored. You can often do this at the algorithmic level by carrying around the requisite constant matrix in your derivation. Obviously, a normal sparse matrix is a special case. Offset sparse vectors provide simple ways to express row and column sums as well. On Mon, Dec 1, 2008 at 2:31 PM, Sujit Pal wrote: > On a slightly different note, I've been thinking about some other ways > to reduce the memory footprint (of my application), and I think there > may be some justification for having things like ConstantVector, ie a > large non-sparse Vector which contains the same data for all its > elements. The idea is similar, the getEntry() method would return a > value that is set into the constructor. > -- Ted Dunning, CTO DeepDyve 4600 Bohannon Drive, Suite 220 Menlo Park, CA 94025 www.deepdyve.com 650-324-0110, ext. 738 858-414-0013 (m) ------=_Part_59002_1035338.1228171770332--