12.07.2015 Views

Programmer's Guide & Language Reference - Dyalog Limited

Programmer's Guide & Language Reference - Dyalog Limited

Programmer's Guide & Language Reference - Dyalog Limited

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 5: Primitive Operators 335Inner Product:R←Xf.gYf must be a dyadic function. g may be any dyadic function which returns a result.The last axis of X must have the same length as the first axis of Y.The result of the derived function has shape (¯1↓⍴X),1↓⍴Y. Each item of R is theresult of f/xg¨y where x and y are typical vectors taken from all the combinationsof vectors along the last axis of X and the first axis of Y respectively.Function f (and the derived function) need not return a result in the exceptional casewhen 2=¯1↑⍴X. In all other cases, function f must return a result.If the result of xg¨y is empty, for any x and y, a DOMAIN ERROR will be reportedunless function f is a primitive scalar dyadic function with an identity elementshown in "Identity Elements" on page 339.Examples761 2 3+.×10 12 1476761 2 3 PLUS.TIMES 10 12 14+/1 2 3×10 12 14NAMESHENRYWILLIAMJAMESSEBASTIANNAMES^.='WILLIAM '0 1 0 0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!