Prev: Frontend suggestions
Next: Equation solving question
From: Stephen Wandzura on 10 Aug 2010 03:55 Can anyone explain why this works: MatrixMultiply = Compile[ {{a, _Integer, 2}, {x, _Integer, 1}}, Inner[Times, a, x, Plus], {{Inner[__], _Integer, 1}} ] MatrixMultiply[{{2, 0}, {0, 1}}, {2, 1}] But this doesn't: LogicalMatrixMultiply = Compile[ {{a, True | False, 2}, {x, True | False, 1}}, Inner[And, a, x, Or], {{Inner[__], True | False, 1}} ] LogicalMatrixMultiply[{{True, False}, {False, True}}, {True, False}] I thought I used the correct syntax for Boolean arguments in Compile...
|
Pages: 1 Prev: Frontend suggestions Next: Equation solving question |