comparison src/Grids/parameter_space.jl @ 1907:09c4fda8779d feature/grids/parameter_spaces

Fix some errors in docstrings
author Jonatan Werpers <jonatan@werpers.com>
date Sat, 01 Feb 2025 22:55:16 +0100
parents 447ea06bfa07
children 15be190a40cd
comparison
equal deleted inserted replaced
1906:447ea06bfa07 1907:09c4fda8779d
10 * [`unithyperbox`](@ref) 10 * [`unithyperbox`](@ref)
11 * [`unittriangle`](@ref) 11 * [`unittriangle`](@ref)
12 * [`unittetrahedron`](@ref) 12 * [`unittetrahedron`](@ref)
13 * [`unitsimplex`](@ref) 13 * [`unitsimplex`](@ref)
14 14
15 See also: [`Interval`](@ref), [`Rectangle`](@ref), [`Box`](@ref), 15 See also: [`Interval`](@ref), [`HyperBox`](@ref),
16 [`Triangle`](@ref), [`Tetrahedron`](@ref), [`HyperBox`](@ref), 16 [`Simplex`](@ref).
17 [`Simplex`](@ref),
18 """ 17 """
19 abstract type ParameterSpace{D} end 18 abstract type ParameterSpace{D} end
20 Base.ndims(::ParameterSpace{D}) where D = D 19 Base.ndims(::ParameterSpace{D}) where D = D
21 20
22 """ 21 """
150 Tetrahedron{T} = Simplex{T,3} 149 Tetrahedron{T} = Simplex{T,3}
151 150
152 """ 151 """
153 unittriangle(T=Float64) 152 unittriangle(T=Float64)
154 153
155 The simplex with verticies ``(0,0)``, ``(1,0)``, and ``(0,1). 154 The simplex with verticies ``(0,0)``, ``(1,0)``, and ``(0,1)``.
156 """ 155 """
157 unittriangle(T=Float64) = unitsimplex(T,2) 156 unittriangle(T=Float64) = unitsimplex(T,2)
158 157
159 """ 158 """
160 unittetrahedron(T=Float64) 159 unittetrahedron(T=Float64)
164 unittetrahedron(T=Float64) = unitsimplex(T,3) 163 unittetrahedron(T=Float64) = unitsimplex(T,3)
165 164
166 """ 165 """
167 unitsimplex(T=Float64,D) 166 unitsimplex(T=Float64,D)
168 167
169 The unit simplex in dimension ``D`` with verticies ``(0,0,0,...)``, ``(1,0,0,...)``, ``(0,1,0,...)``, ``(0,0,1,...)``... 168 The unit simplex in dimension `D` with verticies ``(0,0,0,...)``, ``(1,0,0,...)``, ``(0,1,0,...)``, ``(0,0,1,...)``...
170 """ 169 """
171 function unitsimplex(T,D) 170 function unitsimplex(T,D)
172 z = @SVector zeros(T,D) 171 z = @SVector zeros(T,D)
173 unitelement = one(eltype(z)) 172 unitelement = one(eltype(z))
174 verticies = ntuple(i->setindex(z, unitelement, i), D) 173 verticies = ntuple(i->setindex(z, unitelement, i), D)