|
1 | | -export ∞, asℝ, asℝ₊, asℝ₋, as𝕀 |
| 1 | +export ∞, asℝ, asℝ₊, asℝ₋, as𝕀, as_real, as_positive_real, as_negative_real, |
| 2 | + as_unit_interval |
2 | 3 |
|
3 | 4 | """ |
4 | 5 | $(TYPEDEF) |
@@ -170,14 +171,38 @@ function as(::Type{Real}, left::Real, right::Real) |
170 | 171 | ScaledShiftedLogistic(right - left, left) |
171 | 172 | end |
172 | 173 |
|
173 | | -"Transform to a non-negative real number." |
| 174 | +""" |
| 175 | +Transform to a positive real number. |
| 176 | +
|
| 177 | +`asℝ₊` and `as_positive_real` are equivalent alternatives. |
| 178 | +""" |
174 | 179 | const asℝ₊ = as(Real, 0.0, ∞) |
175 | 180 |
|
176 | | -"Transform to a non-positive real number." |
| 181 | +const as_positive_real = asℝ₊ |
| 182 | + |
| 183 | +""" |
| 184 | +Transform to a negative real number. |
| 185 | +
|
| 186 | +`asℝ₋` and `as_negative_real` are equivalent alternatives. |
| 187 | +""" |
177 | 188 | const asℝ₋ = as(Real, -∞, 0.0) |
178 | 189 |
|
179 | | -"Transform to the unit interval `(0, 1)`." |
| 190 | +const as_negative_real = asℝ₋ |
| 191 | + |
| 192 | +""" |
| 193 | +Transform to the unit interval `(0, 1)`. |
| 194 | +
|
| 195 | +`as𝕀` and `as_unit_interval` are equivalent alternatives. |
| 196 | +""" |
180 | 197 | const as𝕀 = as(Real, 0.0, 1.0) |
181 | 198 |
|
182 | | -"Transform to the real line (identity)." |
| 199 | +const as_unit_interval = as𝕀 |
| 200 | + |
| 201 | +""" |
| 202 | +Transform to the real line (identity). |
| 203 | +
|
| 204 | +`asℝ` and `as_real` are equivalent alternatives. |
| 205 | +""" |
183 | 206 | const asℝ = as(Real, -∞, ∞) |
| 207 | + |
| 208 | +const as_real = asℝ |
0 commit comments