File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -510,6 +510,33 @@ finally, rotate it three times (270°):
510
510
```
511
511
512
512
513
+ ### outer
514
+
515
+ ** ` outer ` ** is generalized outer product of arrays using a provided function.
516
+
517
+ Lambda list: ` (function &rest arrays) `
518
+
519
+ The resulting array has the concatenated dimensions of arrays
520
+
521
+ The examples below return the [ outer
522
+ product] ( https://en.wikipedia.org/wiki/Outer_product ) of vectors or arrays. This is the outer product you get in most linear algebra packages.
523
+
524
+ ``` lisp
525
+ (defparameter a #(2 3 5))
526
+ (defparameter b #(7 11))
527
+ (defparameter c #2A((7 11)
528
+ (13 17)))
529
+
530
+ (outer #'* a b)
531
+ ;#2A((14 22)
532
+ ; (21 33)
533
+ ; (35 55))
534
+
535
+ (outer #'* c a)
536
+ ;#3A(((14 21 35) (22 33 55))
537
+ ; ((26 39 65) (34 51 85)))
538
+ ```
539
+
513
540
## Indexing operations
514
541
515
542
### nested-loop
You can’t perform that action at this time.
0 commit comments