Skip to content

Commit be70ac0

Browse files
authored
Docstrings for maxspace and friends (#212)
1 parent 5dfa945 commit be70ac0

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

src/Space.jl

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,13 @@ for FUNC in (:conversion_type,:maxspace)
164164
end
165165

166166

167-
# gives a space c that has a banded conversion operator TO a and b
167+
"""
168+
conversion_type(a::Space, b::Space)
169+
170+
Return a space that has a banded conversion operator TO `a` and `b`
171+
172+
See also [`maxspace`](@ref)
173+
"""
168174
function conversion_type(a,b)
169175
if spacescompatible(a,b)
170176
a
@@ -181,8 +187,13 @@ end
181187

182188

183189

190+
"""
191+
maxspace(a::Space, b::Space)
192+
193+
Return a space that has a banded conversion operator FROM `a` and `b`
184194
185-
# gives a space c that has a banded conversion operator FROM a and b
195+
See also [`conversion_type`](@ref)
196+
"""
186197
maxspace(a,b) = NoSpace() # TODO: this fixes weird bug with Nothing
187198
function maxspace(a::Space, b::Space)
188199
if spacescompatible(a,b)
@@ -278,11 +289,19 @@ end
278289

279290
union(a::Space, bs::Space...) = foldl(union, bs, init = a)
280291

281-
# tests whether a Conversion operator exists
292+
"""
293+
hasconversion(a,b)
294+
295+
Test whether a banded `Conversion` operator exists.
296+
"""
282297
hasconversion(a,b) = maxspace(a,b) == b
283298

284299

285-
# tests whether a coefficients can be converted to b
300+
"""
301+
isconvertible(a::Space, b::Space)
302+
303+
Test whether coefficients may be converted from `a` to `b` through a banded `Conversion` operator.
304+
"""
286305
isconvertible(a,b) = a == b || hasconversion(a,b)
287306

288307
## Conversion routines
@@ -328,6 +347,7 @@ function defaultcoefficients(f,a,b,inplace = Val(false))
328347
end
329348
if spacescompatible(a,csp) || spacescompatible(b,csp)
330349
# b is csp too, so we are stuck, try Fun constructor
350+
# This only works for the out-of-place version as of now
331351
_coefficients!!(inplace)(default_Fun(_Fun(f,a),b))
332352
else
333353
_coefficients!!(inplace)(f,a,csp,b)
@@ -472,7 +492,9 @@ end
472492

473493

474494
"""
475-
`ConstantSpace` is the 1-dimensional scalar space.
495+
ConstantSpace
496+
497+
The 1-dimensional scalar space.
476498
"""
477499
struct ConstantSpace{DD,R} <: Space{DD,R}
478500
domain::DD
@@ -519,7 +541,9 @@ blocklengths(::ConstantSpace) = Vec(1)
519541
struct SequenceSpace <: Space{PositiveIntegers,Nothing} end
520542

521543
"""
522-
`SequenceSpace` is the space of all sequences, i.e., infinite vectors.
544+
SequenceSpace
545+
546+
The space of all sequences, i.e., infinite vectors.
523547
Also denoted ℓ⁰.
524548
"""
525549
SequenceSpace()

0 commit comments

Comments
 (0)