[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
0-1 sparse representations?
From: |
E R |
Subject: |
0-1 sparse representations? |
Date: |
Sat, 19 Nov 2011 14:49:41 -0600 |
I'm interested if Octave has the ability to represent a 0-1 sparse
matrix where there is only one 1 per row.
For example, it seems that Octave has a special representation for
permutation matricies:
a = eye(3)([3,1,2],:); whos;
The storage for a is only 12 bytes, i.e. 3 4-byte integers.
However, in this case:
b = eye(3)([1,3,3],:); whos;
the storage for b is 72 bytes - i.e. 9 8-byte doubles.
Does Octave has a special representation for a 0-1 matrix where there
is only one 1 per row, and, if so, how does one go about building it?