@@ -70,17 +70,17 @@ For some reason, though, putting code to this transformation really helped me fi
7070
7171{% method %}
7272{% sample lang="jl" %}
73- [ import:2-11 , lang:"julia"] ( code/julia/fft.jl )
73+ [ import:4-13 , lang:"julia"] ( code/julia/fft.jl )
7474{% sample lang="c" %}
7575[ import:8-19, lang:"c_cpp"] ( code/c/fft.c )
7676{% sample lang="cpp" %}
7777[ import:23-33, lang:"c_cpp"] ( code/c++/fft.cpp )
7878{% sample lang="hs" %}
79- [ import:2-11 , lang:"julia"] ( code/julia/fft.jl )
79+ [ import:4-13 , lang:"julia"] ( code/julia/fft.jl )
8080{% sample lang="py" %}
8181[ import:5-11, lang:"python"] ( code/python/fft.py )
8282{% sample lang="scratch" %}
83- [ import:2-11 , lang:"julia"] ( code/julia/fft.jl )
83+ [ import:4-13 , lang:"julia"] ( code/julia/fft.jl )
8484{% endmethod %}
8585
8686In this function, we define ` n ` to be a set of integers from $$ 0 \rightarrow N-1 $$ and arrange them to be a column.
@@ -115,7 +115,7 @@ With recursion, we can reduce the complexity to $$\sim \mathcal{O}(n \log n)$$,
115115In the end, the code looks like:
116116{% method %}
117117{% sample lang="jl" %}
118- [ import:14-31 , lang:"julia"] ( code/julia/fft.jl )
118+ [ import:16-32 , lang:"julia"] ( code/julia/fft.jl )
119119{% sample lang="c" %}
120120[ import:20-39, lang:"c_cpp"] ( code/c/fft.c )
121121{% sample lang="cpp" %}
@@ -125,7 +125,7 @@ In the end, the code looks like:
125125{% sample lang="py" %}
126126[ import:13-24, lang:"python"] ( code/python/fft.py )
127127{% sample lang="scratch" %}
128- [ import:14-31 , lang:"julia"] ( code/julia/fft.jl )
128+ [ import:16-32 , lang:"julia"] ( code/julia/fft.jl )
129129{% endmethod %}
130130
131131As a side note, we are enforcing that the array must be a power of 2 for the operation to work.
0 commit comments