File tree Expand file tree Collapse file tree 4 files changed +7
-1
lines changed
src/data_structures/triangulation Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
name = " DelaunayTriangulation"
2
2
uuid = " 927a84f5-c5f4-47a5-9785-b46e178433df"
3
3
authors = [
" Daniel VandenHeuvel <[email protected] >" ]
4
- version = " 0.5.0 "
4
+ version = " 0.5.1 "
5
5
6
6
[deps ]
7
7
DataStructures = " 864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ Returns the number of solid edges in `tri`.
68
68
num_solid_edges (tri:: Triangulation ) = num_edges (tri) - num_ghost_edges (tri)
69
69
70
70
abstract type AbstractEachEdge{E} end
71
+ edge_type (itr:: AbstractEachEdge ) = edge_type (itr. tri)
71
72
Base. IteratorSize (:: Type{<:AbstractEachEdge} ) = Base. HasLength ()
72
73
Base. IteratorEltype (:: Type{<:AbstractEachEdge{E}} ) where {E} = Base. IteratorEltype (E)
73
74
Base. eltype (:: Type{<:AbstractEachEdge{E}} ) where {E} = edge_type (E)
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ Returns the number of solid triangles in `tri`.
67
67
@inline num_solid_triangles (tri:: Triangulation ) = num_triangles (tri) - num_ghost_triangles (tri)
68
68
69
69
abstract type AbstractEachTriangle{T} end
70
+ triangle_type (itr:: AbstractEachTriangle ) = triangle_type (itr. tri)
70
71
Base. IteratorSize (:: Type{<:AbstractEachTriangle} ) = Base. HasLength ()
71
72
Base. IteratorEltype (:: Type{<:AbstractEachTriangle{T}} ) where {T} = Base. IteratorEltype (T)
72
73
Base. eltype (:: Type{<:AbstractEachTriangle{T}} ) where {T} = triangle_type (T)
Original file line number Diff line number Diff line change 265
265
@test sort (collect (filter (! DT. is_ghost_triangle, each_triangle (___tri)))) == sort (collect (each_solid_triangle (___tri)))
266
266
@test sort (collect (filter (DT. is_ghost_triangle, each_triangle (___tri)))) == sort (collect (each_ghost_triangle (___tri)))
267
267
@test DelaunayTriangulation. sort_triangles (each_solid_triangle (tri)) == DelaunayTriangulation. sort_triangles (get_triangles (___tri))
268
+ @test DelaunayTriangulation. triangle_type (_ghost_itr) == DelaunayTriangulation. triangle_type (_ghost_itr)
269
+ @test DelaunayTriangulation. triangle_type (_solid_itr) == DelaunayTriangulation. triangle_type (_solid_itr)
268
270
end
269
271
270
272
@testset " Edges" begin
303
305
@test length (collect (each_ghost_edge (___tri))) == num_edges (___tri) .- length (sort (collect (filter (! DT. is_ghost_edge, each_edge (___tri)))))
304
306
@test length (collect (each_ghost_edge (___tri))) == DT. num_ghost_edges (___tri)== length (_ghost_itr)
305
307
@test length (collect (each_solid_edge (___tri))) == DT. num_solid_edges (___tri) == length (_solid_itr)
308
+ @test DelaunayTriangulation. edge_type (_ghost_itr) == DelaunayTriangulation. edge_type (_ghost_itr)
309
+ @test DelaunayTriangulation. edge_type (_solid_itr) == DelaunayTriangulation. edge_type (_solid_itr)
306
310
end
307
311
308
312
@testset " Points" begin
You can’t perform that action at this time.
0 commit comments