@@ -243,69 +243,131 @@ end
243
243
244
244
245
245
"""
246
- `Derivative(sp::Space,k::Int)` represents the `k`-th derivative on `sp`.
246
+ Derivative(sp::Space, k::Int)
247
+
248
+ Return the `k`-th derivative operator on the space `sp`.
249
+
250
+ # Examples
251
+ ```jldoctest
252
+ julia> Derivative(Chebyshev(), 2) * Fun(x->x^4) ≈ Fun(x->12x^2)
253
+ true
254
+ ```
247
255
"""
248
256
Derivative (:: Space ,:: Int )
249
257
250
258
"""
251
- `Derivative(sp::Space,k::Vector{Int})` represents a partial derivative on a multivariate space.
252
- For example,
259
+ Derivative(sp::Space, k::AbstractVector{Int})
260
+
261
+ Return a partial derivative operator on a multivariate space. For example,
253
262
```julia
254
263
Dx = Derivative(Chebyshev()^2,[1,0]) # ∂/∂x
255
264
Dy = Derivative(Chebyshev()^2,[0,1]) # ∂/∂y
256
265
```
266
+
267
+ !!! tip
268
+ Using a static vector as the second argument would help with type-stability.
269
+
270
+ # Examples
271
+ ```jldoctest
272
+ julia> ∂y = Derivative(Chebyshev()^2, [0,1]);
273
+
274
+ julia> ∂y * Fun((x,y)->x^2 + y^2) ≈ Fun((x,y)->2y)
275
+ true
276
+ ```
257
277
"""
258
- Derivative (:: Space ,:: Vector {Int} )
278
+ Derivative (:: Space , :: AbstractVector {Int} )
259
279
260
280
"""
261
- `Derivative(sp::Space)` represents the first derivative `Derivative(sp,1)`.
281
+ Derivative(sp::Space)
282
+
283
+ Return the first derivative operator, equivalent to `Derivative(sp,1)`.
284
+
285
+ # Examples
286
+ ```jldoctest
287
+ julia> Derivative(Chebyshev()) * Fun(x->x^2) ≈ Fun(x->2x)
288
+ true
289
+ ```
262
290
"""
263
291
Derivative (:: Space )
264
292
265
293
"""
266
- `Derivative(k)` represents the `k`-th derivative, acting on an unset space.
294
+ Derivative(k)
295
+
296
+ Return the `k`-th derivative, acting on an unset space.
267
297
Spaces will be inferred when applying or manipulating the operator.
298
+ If `k` is an `Int`, this returns a derivative in an univariate space.
299
+ If `k` is an `AbstractVector{Int}`, this returns a partial derivative
300
+ in a multivariate space.
301
+
302
+ # Examples
303
+ ```jldoctest
304
+ julia> Derivative(1) * Fun(x->x^2) ≈ Fun(x->2x)
305
+ true
306
+
307
+ julia> Derivative([0,1]) * Fun((x,y)->x^2+y^2) ≈ Fun((x,y)->2y)
308
+ true
309
+ ```
268
310
"""
269
311
Derivative (k)
270
312
271
313
"""
272
- `Derivative()` represents the first derivative on an unset space.
314
+ Derivative()
315
+
316
+ Return the first derivative on an unset space.
273
317
Spaces will be inferred when applying or manipulating the operator.
318
+
319
+ # Examples
320
+ ```jldoctest
321
+ julia> Derivative() * Fun(x->x^2) ≈ Fun(x->2x)
322
+ true
323
+ ```
274
324
"""
275
325
Derivative ()
276
326
277
327
278
328
"""
279
- `Integral(sp::Space,k::Int)` represents a `k`-th integral on `sp`.
329
+ Integral(sp::Space, k::Int)
330
+
331
+ Return the `k`-th integral operator on `sp`.
280
332
There is no guarantee on normalization.
281
333
"""
282
- Integral (:: Space ,:: Int )
334
+ Integral (:: Space , :: Int )
283
335
284
336
285
337
"""
286
- `Integral(sp::Space)` represents the first integral `Integral(sp,1)`.
338
+ Integral(sp::Space)
339
+
340
+ Return the first integral operator, equivalent to `Integral(sp,1)`.
287
341
"""
288
342
Integral (:: Space )
289
343
290
344
"""
291
- `Integral(k)` represents the `k`-th integral, acting on an unset space.
345
+ Integral(k::Int)
346
+
347
+ Return the `k`-th integral operator, acting on an unset space.
292
348
Spaces will be inferred when applying or manipulating the operator.
293
349
"""
294
- Integral (k)
350
+ Integral (k:: Int )
295
351
296
352
"""
297
- `Intergral()` represents the first integral on an unset space.
353
+ Intergral()
354
+
355
+ Return the first integral operator on an unset space.
298
356
Spaces will be inferred when applying or manipulating the operator.
299
357
"""
300
358
Integral ()
301
359
302
360
"""
303
- `Laplacian(sp::Space)` represents the laplacian on space `sp`.
361
+ Laplacian(sp::Space)
362
+
363
+ Return the laplacian operator on space `sp`.
304
364
"""
305
365
Laplacian (:: Space )
306
366
307
367
"""
308
- `Laplacian()` represents the laplacian on an unset space.
368
+ Laplacian()
369
+
370
+ Return the laplacian operator on an unset space.
309
371
Spaces will be inferred when applying or manipulating the operator.
310
372
"""
311
373
Laplacian ()
0 commit comments