@@ -3,13 +3,20 @@ export Space, domainspace, rangespace, maxspace,Space,conversion_type, transform
3
3
4
4
5
5
6
- # Space maps the Domain to the type R
7
- # For example, we have
8
- # Chebyshev{Interval{Float64}} <: Space{Interval{Float64},Float64}
9
- # Laurent{PeriodicSegment{Float64}} <: Space{PeriodicSegment{Float64},ComplexF64}
10
- # Fourier{Circle{ComplexF64}} <: Space{Circle{ComplexF64},Float64}
11
- # Note for now Space doesn't contain any information about the coefficients
6
+ """
7
+ Space{D<:Domain, R}
8
+
9
+ Abstract supertype of various spaces in which a `Fun` may be defined, where `R` represents
10
+ the type of the basis functions over the domain. Space maps the `Domain` to the type `R`.
11
+
12
+ For example, we have
13
+ * `Chebyshev{Interval{Float64}} <: Space{Interval{Float64},Float64}`
14
+ * `Laurent{PeriodicSegment{Float64}} <: Space{PeriodicSegment{Float64},ComplexF64}`
15
+ * `Fourier{Circle{ComplexF64}} <: Space{Circle{ComplexF64},Float64}`
12
16
17
+ !!! note
18
+ For now, `Space` doesn't contain any information about the coefficients
19
+ """
13
20
abstract type Space{D,R} end
14
21
15
22
@@ -661,3 +668,33 @@ spacescompatible(::SequenceSpace,::SequenceSpace) = true
661
668
# # Boundary
662
669
663
670
boundary (S:: Space ) = boundary (domain (S))
671
+
672
+ """
673
+ (s::Space)(n::Integer)
674
+
675
+ Return a `Fun` with the coefficients being a sparse representation of
676
+ `[zeros(n); 1]`. The result is primarily meant to be evaluated at
677
+ a specific point.
678
+
679
+ For orthogonal polynomial spaces, the result will usually represent the `n`-th
680
+ basis function.
681
+
682
+ # Examples
683
+ ```jldoctest
684
+ julia> Chebyshev()(2)
685
+ Fun(Chebyshev(), [0.0, 0.0, 1.0])
686
+ ```
687
+ """
688
+ (s:: Space )(n:: Integer ) = basisfunction (s, n+ 1 )
689
+ """
690
+ (s::Space)(n::Integer, points...)
691
+
692
+ Evaluate `s(n)(points...)`
693
+
694
+ # Examples
695
+ ```jldoctest
696
+ julia> Chebyshev()(1, 0.5)
697
+ 0.5
698
+ ```
699
+ """
700
+ (s:: Space )(n:: Integer , args... ) = s (n)(args... )
0 commit comments