RosettaCodeData/Task/Matrix-multiplication/J/matrix-multiplication-2.j
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

3 lines
246 B
Text

x ~:/ .*. y NB. boolean inner product ( ~: is "not equal" (exclusive or) and *. is "and")
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