comparison src/Grids/parameter_space.jl @ 1911:449cce897da9 feature/grids/parameter_spaces

Update some docstrings
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 07 Feb 2025 21:50:35 +0100
parents 15be190a40cd
children 77ff0a2acbe5
comparison
equal deleted inserted replaced
1910:15be190a40cd 1911:449cce897da9
104 104
105 105
106 """ 106 """
107 unitsquare(T=Float64) 107 unitsquare(T=Float64)
108 108
109 The square starting at ``(0,0)`` with side length 1. 109 The square limited by 0 and 1 in each dimension.
110 """ 110 """
111 unitsquare(T=Float64) = unithyperbox(T,2) 111 unitsquare(T=Float64) = unithyperbox(T,2)
112 112
113 """ 113 """
114 unitcube(T=Float64) 114 unitcube(T=Float64)
115 115
116 The cube starting at ``(0,0,0)`` with side length 1. 116 The cube limited by 0 and 1 in each dimension.
117 """ 117 """
118 unitcube(T=Float64) = unithyperbox(T,3) 118 unitcube(T=Float64) = unithyperbox(T,3)
119 119
120 """ 120 """
121 unithyperbox(T=Float64, D) 121 unithyperbox(T=Float64, D)
122 122
123 The hypercube in dimension `D` starting at ``(0,0,0,...)`` with side length 1. 123 The hypercube limited by 0 and 1 in each dimension.
124 """ 124 """
125 unithyperbox(T, D) = HyperBox((@SVector zeros(T,D)), (@SVector ones(T,D))) 125 unithyperbox(T, D) = HyperBox((@SVector zeros(T,D)), (@SVector ones(T,D)))
126 unithyperbox(D) = unithyperbox(Float64,D) 126 unithyperbox(D) = unithyperbox(Float64,D)
127 127
128 128
139 end 139 end
140 140
141 """ 141 """
142 Simplex(verticies...) 142 Simplex(verticies...)
143 143
144 A simplex with the given vierticies. 144 A simplex with the given verticies.
145 """ 145 """
146 function Simplex(verticies::Vararg{AbstractArray}) 146 function Simplex(verticies::Vararg{AbstractArray})
147 ET = mapreduce(eltype,promote_type,verticies) 147 ET = mapreduce(eltype,promote_type,verticies)
148 T = SVector{length(verticies[1]),ET} 148 T = SVector{length(verticies[1]),ET}
149 149