Skip to content

Commit 4bb16db

Browse files
authored
fixing linking issues in convolution chapter (#868)
1 parent c8a40e3 commit 4bb16db

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

contents/convolutions/1d/1d.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ With this in mind, we can almost directly transcribe the discrete equation into
5353

5454
{% method %}
5555
{% sample lang="jl" %}
56-
[import:27-46, lang:"julia"](../code/julia/1d_convolution.jl)
56+
[import:27-46, lang:"julia"](code/julia/1d_convolution.jl)
5757
{% sample lang="cs" %}
58-
[import:63-84, lang:"csharp"](../code/csharp/1DConvolution.cs)
58+
[import:63-84, lang:"csharp"](code/csharp/1DConvolution.cs)
5959
{% endmethod %}
6060

6161
The easiest way to reason about this code is to read it as you might read a textbook.
@@ -186,38 +186,38 @@ Here it is again for clarity:
186186

187187
{% method %}
188188
{% sample lang="jl" %}
189-
[import:27-46, lang:"julia"](../code/julia/1d_convolution.jl)
189+
[import:27-46, lang:"julia"](code/julia/1d_convolution.jl)
190190
{% sample lang="cs" %}
191-
[import:63-84, lang:"csharp"](../code/csharp/1DConvolution.cs)
191+
[import:63-84, lang:"csharp"](code/csharp/1DConvolution.cs)
192192
{% endmethod %}
193193

194194
Here, the main difference between the bounded and unbounded versions is that the output array size is smaller in the bounded case.
195195
For an unbounded convolution, the function would be called with a the output array size specified to be the size of both signals put together:
196196

197197
{% method %}
198198
{% sample lang="jl" %}
199-
[import:58-59, lang:"julia"](../code/julia/1d_convolution.jl)
199+
[import:58-59, lang:"julia"](code/julia/1d_convolution.jl)
200200
{% sample lang="cs" %}
201-
[import:96-97, lang:"csharp"](../code/csharp/1DConvolution.cs)
201+
[import:96-97, lang:"csharp"](code/csharp/1DConvolution.cs)
202202
{% endmethod %}
203203

204204
On the other hand, the bounded call would set the output array size to simply be the length of the signal
205205

206206
{% method %}
207207
{% sample lang="jl" %}
208-
[import:61-62, lang:"julia"](../code/julia/1d_convolution.jl)
208+
[import:61-62, lang:"julia"](code/julia/1d_convolution.jl)
209209
{% sample lang="cs" %}
210-
[import:98-99, lang:"csharp"](../code/csharp/1DConvolution.cs)
210+
[import:98-99, lang:"csharp"](code/csharp/1DConvolution.cs)
211211
{% endmethod %}
212212

213213
Finally, as we mentioned before, it is possible to center bounded convolutions by changing the location where we calculate the each point along the filter.
214214
This can be done by modifying the following line:
215215

216216
{% method %}
217217
{% sample lang="jl" %}
218-
[import:35-35, lang:"julia"](../code/julia/1d_convolution.jl)
218+
[import:35-35, lang:"julia"](code/julia/1d_convolution.jl)
219219
{% sample lang="cs" %}
220-
[import:71-71, lang:"csharp"](../code/csharp/1DConvolution.cs)
220+
[import:71-71, lang:"csharp"](code/csharp/1DConvolution.cs)
221221
{% endmethod %}
222222

223223
Here, `j` counts from `i-length(filter)` to `i`.
@@ -249,9 +249,9 @@ In code, this typically amounts to using some form of modulus operation, as show
249249

250250
{% method %}
251251
{% sample lang="jl" %}
252-
[import:4-25, lang:"julia"](../code/julia/1d_convolution.jl)
252+
[import:4-25, lang:"julia"](code/julia/1d_convolution.jl)
253253
{% sample lang="cs" %}
254-
[import:38-61, lang:"csharp"](../code/csharp/1DConvolution.cs)
254+
[import:38-61, lang:"csharp"](code/csharp/1DConvolution.cs)
255255
{% endmethod %}
256256

257257
This is essentially the same as before, except for the modulus operations, which allow us to work on a periodic domain.
@@ -266,9 +266,9 @@ For the code associated with this chapter, we have used the convolution to gener
266266

267267
{% method %}
268268
{% sample lang="jl" %}
269-
[import, lang:"julia"](../code/julia/1d_convolution.jl)
269+
[import, lang:"julia"](code/julia/1d_convolution.jl)
270270
{% sample lang="cs" %}
271-
[import, lang:"csharp"](../code/csharp/1DConvolution.cs)
271+
[import, lang:"csharp"](code/csharp/1DConvolution.cs)
272272
{% endmethod %}
273273

274274
At a test case, we have chosen to use two sawtooth functions, which should produce the following images:

0 commit comments

Comments
 (0)