Mercurial > repos > public > sbplib_julia
comparison src/Grids/parameter_space.jl @ 1943:48c49c04f3b2 feature/grids/manifolds
Merge feature/grids/parameter_spaces
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 07 Feb 2025 15:29:40 +0100 |
parents | 15be190a40cd |
children | 449cce897da9 |
comparison
equal
deleted
inserted
replaced
1942:b8395f69ad80 | 1943:48c49c04f3b2 |
---|---|
43 | 43 |
44 The limits of the interval. | 44 The limits of the interval. |
45 """ | 45 """ |
46 limits(i::Interval) = (i.a, i.b) | 46 limits(i::Interval) = (i.a, i.b) |
47 | 47 |
48 boundary_identifiers(::Interval) = (LowerBoundary(), UpperBoundary()) | |
49 | |
48 """ | 50 """ |
49 unitinterval(T=Float64) | 51 unitinterval(T=Float64) |
50 | 52 |
51 The interval ``(0,1)``. | 53 The interval ``(0,1)``. |
52 """ | 54 """ |
88 limits(box::HyperBox) | 90 limits(box::HyperBox) |
89 | 91 |
90 The lower and upper limits of `box` as tuples. | 92 The lower and upper limits of `box` as tuples. |
91 """ | 93 """ |
92 limits(box::HyperBox) = (box.a, box.b) | 94 limits(box::HyperBox) = (box.a, box.b) |
95 | |
96 function boundary_identifiers(box::HyperBox) | |
97 mapreduce(vcat, 1:ndims(box)) do d | |
98 [ | |
99 CartesianBoundary{d, LowerBoundary}(), | |
100 CartesianBoundary{d, UpperBoundary}(), | |
101 ] | |
102 end | |
103 end | |
104 | |
93 | 105 |
94 """ | 106 """ |
95 unitsquare(T=Float64) | 107 unitsquare(T=Float64) |
96 | 108 |
97 The square starting at ``(0,0)`` with side length 1. | 109 The square starting at ``(0,0)`` with side length 1. |