bugGNU Octave - Bugs: bug #41478, Include non-standard logical...


bug #41478: Include non-standard logical matrix-multiply operations

Submitter:  David Spies <dspyz>
Submitted:  Thu 06 Feb 2014 07:56:21 AM UTC
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Thu 06 Feb 2014 07:56:21 AM UTC, original submission:  

Can you add three fairly standard logical matrix multiply operations (particularly for sparse matrices) which can be useful for dealing with graphs and adjacency matrices?

Same as
res = logical(A * B)

Same as
res = A * B == sum(B,1)
(here the '==' is automatically broadcasted)
This one is the one I actually need since the matrix A * B may require more memory than I have available, but I suspect there's a more memory efficient way to make this particular computation.
Particularly if we find a k such that A(i,k) is false and B(k,j) is true than res(i,j) must be false (without having to explore other k-values)

Same as
res = logical(mod(A * B,2))

You can think of these operations in the context that the columns of B mark sets of relevant variables and the rows of A are values for those variables.  The resulting matrix represents each of the operations (any, or, parity) for each set of values on each set of variables.

Note that a normal matrix multiply can be thought of as mult_join_sum for a logical matrix B.

I suppose there could be others like mult_maj, but that doesn't correspond to a commutative associative binary operation like the others (and, or, xor), so I expect there might not be anything to be gained by implementing it explicitly.

David Spies <dspyz>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by dspyz (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-04b1.
    Corresponding source code