Walsh matrix: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
(→{{header|jq}}: kprod) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 798:
'''Works with jaq, the Rust implementation of jq'''
This entry uses a non-recursive method for creating Walsh matrices, but the `kprod` definition
at [[Kronecker_product#jq]] could also be used as follows:
<syntaxhighlight lang="jq">
## Generate a Walsh matrix of size 2^$n for $n >= 1
def
. as $n
| [[1, 1], [1, -1]] as $w2
| if $n < 2 then $w2 else kprod($w2; $n - 1 |
</syntaxhighlight>
<syntaxhighlight lang="jq">
Line 1,500 ⟶ 1,501:
===Wren-cli===
Text mode version.
<syntaxhighlight lang="
import "./fmt" for Fmt
Line 1,672 ⟶ 1,673:
{{libheader|Wren-polygon}}
Image mode version.
<syntaxhighlight lang="
import "input" for Keyboard
import "graphics" for Canvas, Color
|