Matrix multiplication: Difference between revisions

m
(Added easier library-dependent version to Lua section)
Line 2,118:
x *./ .= y NB. which rows of x are the same as vector y?
x + / .= y NB. number of places where a value in row x equals the corresponding value in y</lang>
[[Floyd-Warshall_algorithm#J|etc.]]
etc.
 
The general inner product extends to multidimensional arrays, requiring only that <tt> x </tt>and<tt> y </tt> be conformable (trailing dimension of array <tt>x</tt> equals the leading dimension of array <tt>y</tt>). For example, the matrix multiplication of two dimensional arrays requires <tt>x</tt> to have the same numbers of rows as <tt>y</tt> has columns, as you would expect.
6,962

edits