You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: NEWS.md
+4
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# Changelog
2
2
3
+
## 1.4.0
4
+
5
+
- Updated to AdaptivePredicates.jl v1.2, now allowing caches to be passed to the predicates involving `incircle` and `orient3`. These are only useful when using the `AdaptiveKernel()` kernel. Outside of triangulating, these caches are not passed by default, but can be provided. The functions `get_incircle_cache` and `get_orient3_cache` can be used for this purpose on a triangulation (without a triangulation, refer to AdaptivePredicate.jl's `incircleadapt_cache` and `orient3adapt_cache`). See [#185](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/185).
6
+
3
7
## 1.3.1
4
8
5
9
- Fix an issue with a weighted triangulation where the lifted points' convex hull was entirely coplanar. See [#184](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/184)
Copy file name to clipboardexpand all lines: src/algorithms/point_location/brute_force.jl
+9-3
Original file line number
Diff line number
Diff line change
@@ -38,16 +38,22 @@ function brute_force_search(tri::Triangulation, q; itr = each_triangle(tri), pre
38
38
end
39
39
40
40
"""
41
-
brute_force_search_enclosing_circumcircle(tri::Triangulation, i, predicates::AbstractPredicateKernel=AdaptiveKernel()) -> Triangle
41
+
brute_force_search_enclosing_circumcircle(tri::Triangulation, i, predicates::AbstractPredicateKernel=AdaptiveKernel(); cache = nothing) -> Triangle
42
42
43
43
Searches for a triangle in `tri` containing the vertex `i` in its circumcircle using brute force. If
44
44
`tri` is a weighted Delaunay triangulation, the triangle returned instead has the lifted vertex `i`
45
45
below its witness plane. If no such triangle exists, `($∅, $∅, $∅)` is returned. You can control
46
46
the method used for computing predicates via the `predicates` argument.
47
+
48
+
The `cache` argument is passed to [`point_position_relative_to_circumcircle`] and should be one of
49
+
- `nothing`: No cache is used.
50
+
- `get_incircle_cache(tri)`: The cache stored inside `tri`.
51
+
- `AdaptivePredicates.incircleadapt_cache(number_type(tri))`: Compute a new cache.
52
+
The cache is only needed if an `AdaptiveKernel()` is used.
47
53
"""
48
-
functionbrute_force_search_enclosing_circumcircle(tri::Triangulation, i, predicates::AbstractPredicateKernel=AdaptiveKernel())
54
+
functionbrute_force_search_enclosing_circumcircle(tri::Triangulation, i, predicates::AbstractPredicateKernel=AdaptiveKernel(); cache::PredicateCacheType=nothing)
Copy file name to clipboardexpand all lines: src/data_structures/triangulation/methods/weights.jl
+26-10
Original file line number
Diff line number
Diff line change
@@ -98,18 +98,24 @@ function get_power_distance(tri::Triangulation, i, j)
98
98
end
99
99
100
100
""""
101
-
get_distance_to_witness_plane(tri::Triangulation, i, V) -> Number
101
+
get_distance_to_witness_plane([kernel::AbstractPredicateKernel = AdaptiveKernel(), ] tri::Triangulation, i, V; cache = nothing) -> Number
102
102
103
103
Computes the distance between the lifted companion of the vertex `i` and the witness plane to the triangle `V`. If `V` is a ghost triangle
104
104
and `i` is not on its solid edge, then the distance is `-Inf` if it is below the ghost triangle's witness plane and `Inf` if it is above. If `V` is a ghost triangle and `i`
105
105
is on its solid edge, then the distance returned is the distance associated with the solid triangle adjoining `V`.
106
106
107
107
In general, the distance is positive if the lifted vertex is above the witness plane, negative if it is below,
108
108
and zero if it is on the plane.
109
+
110
+
The `kernel` argument determines how this result is computed, and should be
111
+
one of [`ExactKernel`](@ref), [`FastKernel`](@ref), and [`AdaptiveKernel`](@ref) (the default).
112
+
See the documentation for more information about these choices.
113
+
114
+
The `cache` keyword argument is passed to [`point_position_relative_to_circumcircle`]. Please see the documentation for that function for more information.
109
115
110
116
See also [`point_position_relative_to_witness_plane`](@ref) and [`get_distance_to_plane`](@ref).
111
117
"""
112
-
functionget_distance_to_witness_plane(tri::Triangulation, i, V)
118
+
functionget_distance_to_witness_plane(kernel::AbstractPredicateKernel, tri::Triangulation, i, V; cache::PredicateCacheType=nothing)
113
119
if!is_ghost_triangle(V)
114
120
u, v, w =triangle_vertices(V)
115
121
p⁺ =get_lifted_point(tri, u)
@@ -118,17 +124,19 @@ function get_distance_to_witness_plane(tri::Triangulation, i, V)
returnget_distance_to_witness_plane(kernel, tri, i, V′; cache)
129
135
end
130
136
end
131
137
end
138
+
get_distance_to_witness_plane(tri::Triangulation, i, V; cache::PredicateCacheType=nothing) =get_distance_to_witness_plane(AdaptiveKernel(), tri, i, V; cache)
139
+
132
140
133
141
"""
134
142
get_weighted_nearest_neighbour(tri::Triangulation, i, j = rand(each_solid_vertex(tri))) -> Vertex
@@ -164,24 +172,32 @@ function _get_weighted_nearest_neighbour(tri, i, j)
Returns `true` if the vertex `i` is submerged in `tri` and `false` otherwise. In the
171
179
second method, `V` is a triangle containing `tri`.
180
+
181
+
The `kernel` argument determines how this result is computed, and should be
182
+
one of [`ExactKernel`](@ref), [`FastKernel`](@ref), and [`AdaptiveKernel`](@ref) (the default).
183
+
See the documentation for more information about these choices.
184
+
185
+
The `cache` keyword argument is passed to [`point_position_relative_to_circumcircle`]. Please see the documentation for that function for more information.
0 commit comments