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 <[EMAIL PROTECTED]> 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)