Iterators
DelaunayTriangulation.each_vertex
— Functioneach_vertex(tri::Triangulation) -> Set{Vertex}
Returns an iterator over all vertices in tri
. Note that, if has_ghost_triangles(tri)
, then some of these vertices will be ghost vertices.
See also each_solid_vertex
and each_ghost_vertex
.
DelaunayTriangulation.each_solid_vertex
— Functioneach_solid_vertex(tri::Triangulation) -> Set{Vertex}
Returns an iterator over all solid vertices in tri
.
See also each_vertex
and each_ghost_vertex
.
DelaunayTriangulation.each_ghost_vertex
— Functioneach_ghost_vertex(tri::Triangulation) -> Set{Vertex}
Returns an iterator over all ghost vertices in tri
.
See also each_vertex
and each_solid_vertex
.
DelaunayTriangulation.each_edge
— Functioneach_edge(E) -> Iterator
Get an iterator over the edges in E
.
Examples
julia> using DelaunayTriangulation
julia> E = Set(((1,2),(1,3),(2,-1)))
Set{Tuple{Int64, Int64}} with 3 elements:
(1, 2)
(1, 3)
(2, -1)
julia> each_edge(E)
Set{Tuple{Int64, Int64}} with 3 elements:
(1, 2)
(1, 3)
(2, -1)
DelaunayTriangulation.each_solid_edge
— Functioneach_solid_edge(tri::Triangulation) -> Edges
Returns an iterator over all solid edges in tri
.
See also each_edge
and each_ghost_edge
.
DelaunayTriangulation.each_ghost_edge
— Functioneach_ghost_edge(tri::Triangulation) -> Edges
Returns an iterator over all ghost edges in tri
.
See also each_edge
and each_solid_edge
.
DelaunayTriangulation.num_vertices
— Functionnum_vertices(G::Graph) -> Integer
Returns the number of vertices in G
.
num_vertices(tri::Triangulation) -> Integer
Returns the number of vertices in tri
. Note that, if has_ghost_triangles(tri)
, then some of these vertices will be ghost vertices.
See also num_solid_vertices
and num_ghost_vertices
.
num_vertices(stats::TriangulationStatistics)
Returns the num_vertices field from the TriangulationStatistics` stats
.
DelaunayTriangulation.num_solid_vertices
— Functionnum_solid_vertices(tri::Triangulation) -> Integer
Returns the number of solid vertices in tri
.
See also num_ghost_vertices
and num_vertices
.
num_solid_vertices(stats::TriangulationStatistics)
Returns the numsolidvertices field from the TriangulationStatistics` stats
.
DelaunayTriangulation.num_ghost_vertices
— Functionnum_ghost_vertices(tri::Triangulation) -> Integer
Returns the number of ghost vertices in tri
.
See also num_solid_vertices
and num_vertices
.
num_ghost_vertices(stats::TriangulationStatistics)
Returns the numghostvertices field from the TriangulationStatistics` stats
.
DelaunayTriangulation.num_edges
— Functionnum_edges(G::Graph) -> Integer
Returns the number of edges in G
. The edges (i, j)
and (j, i)
are counted as one edge.
num_edges(tri::Triangulation) -> Integer
Returns the number of edges in tri
. Note that, if has_ghost_triangles(tri)
, then some of these edges will be ghost edges.
See also num_solid_edges
and num_ghost_edges
.
num_edges(history::PointLocationHistory) -> Integer
Returns the number of edges in history.collinear_segments
.
num_edges(stats::TriangulationStatistics)
Returns the num_edges field from the TriangulationStatistics` stats
.
num_edges(E) -> Integer
Get the number of edges in E
.
Examples
julia> using DelaunayTriangulation
julia> e = [(1, 2), (3, 4), (1, 5)];
julia> num_edges(e)
3
DelaunayTriangulation.num_solid_edges
— Functionnum_solid_edges(tri::Triangulation) -> Integer
Returns the number of solid edges in tri
.
See also num_ghost_edges
and num_edges
.
num_solid_edges(stats::TriangulationStatistics)
Returns the numsolidedges field from the TriangulationStatistics` stats
.
DelaunayTriangulation.num_ghost_edges
— Functionnum_ghost_edges(tri::Triangulation) -> Integer
Returns the number of ghost edges in tri
.
See also num_solid_edges
and num_edges
.
num_ghost_edges(stats::TriangulationStatistics)
Returns the numghostedges field from the TriangulationStatistics` stats
.
DelaunayTriangulation.each_triangle
— Functioneach_triangle(T) -> Iterator
Return an iterator over the triangles in T
.
Examples
julia> using DelaunayTriangulation
julia> T = Set(((1, 2, 3), (-1, 5, 10), (17, 13, 18)));
julia> each_triangle(T)
Set{Tuple{Int64, Int64, Int64}} with 3 elements:
(-1, 5, 10)
(1, 2, 3)
(17, 13, 18)
julia> T = [[1, 2, 3], [10, 15, 18], [1, 5, 6]];
julia> each_triangle(T)
3-element Vector{Vector{Int64}}:
[1, 2, 3]
[10, 15, 18]
[1, 5, 6]
DelaunayTriangulation.each_solid_triangle
— Functioneach_solid_triangle(tri::Triangulation) -> Triangles
Returns an iterator over all solid triangles in tri
.
See also each_triangle
and each_ghost_triangle
.
DelaunayTriangulation.each_ghost_triangle
— Functioneach_ghost_triangle(tri::Triangulation) -> Triangles
Returns an iterator over all ghost triangles in tri
.
See also each_triangle
and each_solid_triangle
.
DelaunayTriangulation.num_triangles
— Functionnum_triangles(tri::Triangulation) -> Integer
Returns the number of triangles in tri
. Note that, if has_ghost_triangles(tri)
, then some of these triangles will be ghost triangles.
num_triangles(stats::TriangulationStatistics)
Returns the num_triangles field from the TriangulationStatistics` stats
.
num_triangles(T) -> Integer
Get the number of triangles in T
.
Examples
julia> using DelaunayTriangulation
julia> T1, T2, T3 = (1, 5, 10), (17, 23, 10), (-1, 10, 5);
julia> T = Set((T1, T2, T3));
julia> num_triangles(T)
3
DelaunayTriangulation.num_solid_triangles
— Functionnum_solid_triangles(tri::Triangulation) -> Integer
Returns the number of solid triangles in tri
.
num_solid_triangles(stats::TriangulationStatistics)
Returns the numsolidtriangles field from the TriangulationStatistics` stats
.
DelaunayTriangulation.num_ghost_triangles
— Functionnum_ghost_triangles(tri::Triangulation) -> Integer
Returns the number of ghost triangles in tri
.
num_ghost_triangles(stats::TriangulationStatistics)
Returns the numghosttriangles field from the TriangulationStatistics` stats
.
DelaunayTriangulation.each_point
— Functioneach_point(points) -> Iterator
Returns an iterator over each point in points
.
Examples
julia> using DelaunayTriangulation
julia> points = [(1.0, 2.0), (5.0, 13.0)];
julia> DelaunayTriangulation.each_point(points)
2-element Vector{Tuple{Float64, Float64}}:
(1.0, 2.0)
(5.0, 13.0)
julia> points = [1.0 5.0 17.7; 5.5 17.7 0.0];
julia> DelaunayTriangulation.each_point(points)
3-element ColumnSlices{Matrix{Float64}, Tuple{Base.OneTo{Int64}}, SubArray{Float64, 1, Matrix{Float64}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true}}:
[1.0, 5.5]
[5.0, 17.7]
[17.7, 0.0]
DelaunayTriangulation.each_point_index
— Functioneach_point_index(points) -> Iterator
Returns an iterator over each point index in points
.
Examples
julia> using DelaunayTriangulation
julia> points = [(1.0, 2.0), (-5.0, 2.0), (2.3, 2.3)];
julia> DelaunayTriangulation.each_point_index(points)
Base.OneTo(3)
julia> points = [1.0 -5.0 2.3; 2.0 2.0 2.3];
julia> DelaunayTriangulation.each_point_index(points)
Base.OneTo(3)
DelaunayTriangulation.each_boundary_edge
— Functioneach_boundary_edge(enricher::BoundaryEnricher) -> KeySet
Returns the set of keys in the parent map of enricher
, i.e. each boundary edge in enricher
.
each_boundary_edge(tri::Triangulation) -> KeySet
Returns an iterator over the boundary edges of tri
, in no specific order.
DelaunayTriangulation.each_segment
— Functioneach_segment(tri::Triangulation) -> Edges
Returns an iterator over all segments in tri
. This includes both interior and boundary segments. If you only want interior segments, then see get_interior_segments
,
DelaunayTriangulation.each_generator
— Functioneach_boundary_polygon(vorn::VoronoiTessellation) -> KeySet
Returns an iterator over the boundary polygon indices of vorn
.
DelaunayTriangulation.each_polygon_vertex
— Functioneach_polygon_vertex(vor::VoronoiTessellation) -> UnitRange
Returns an iterator over each polygon point index of vor
.
DelaunayTriangulation.each_unbounded_polygon
— Functioneach_polygon(vor::VoronoiTessellation) -> Set
Returns an iterator over the polygon indices of vor
.
DelaunayTriangulation.each_polygon
— Functioneach_polygon(vor::VoronoiTessellation) -> ValueIterator
Returns an iterator over each set of polygon vertices of vor
.
DelaunayTriangulation.each_polygon_index
— Functioneach_polygon_index(vor::VoronoiTessellation) -> KeySet
Returns an iterator over the polygon indices of vor
.