octave-bug-tracker
[Top][All Lists]

## [Octave-bug-tracker] [bug #41478] Include non-standard logical matrix-mu

 From: David Spies Subject: [Octave-bug-tracker] [bug #41478] Include non-standard logical matrix-multiply operations Date: Thu, 06 Feb 2014 07:56:22 +0000 User-agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/32.0.1700.102 Chrome/32.0.1700.102 Safari/537.36

```URL:
<http://savannah.gnu.org/bugs/?41478>

Summary: Include non-standard logical matrix-multiply
operations
Project: GNU Octave
Submitted by: dspyz
Submitted on: Thu 06 Feb 2014 07:56:21 GMT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Feature Request
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any

_______________________________________________________

Details:

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

mult_any
Same as
res = logical(A * B)

mult_all
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)

mult_parity
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.

_______________________________________________________

<http://savannah.gnu.org/bugs/?41478>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/

```