Iterators

DelaunayTriangulation.each_edgeFunction
each_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)
source
DelaunayTriangulation.num_edgesFunction
num_edges(G::Graph) -> Integer

Returns the number of edges in G. The edges (i, j) and (j, i) are counted as one edge.

source
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.

source
num_edges(history::PointLocationHistory) -> Integer

Returns the number of edges in history.collinear_segments.

source
num_edges(stats::TriangulationStatistics)

Returns the num_edges field from the TriangulationStatistics` stats.

source
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
source
DelaunayTriangulation.each_triangleFunction
each_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]
source
DelaunayTriangulation.num_trianglesFunction
num_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.

source
num_triangles(stats::TriangulationStatistics)

Returns the num_triangles field from the TriangulationStatistics` stats.

source
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
source
DelaunayTriangulation.each_pointFunction
each_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]
source
DelaunayTriangulation.each_point_indexFunction
each_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)
source
DelaunayTriangulation.each_boundary_edgeFunction
each_boundary_edge(enricher::BoundaryEnricher) -> KeySet

Returns the set of keys in the parent map of enricher, i.e. each boundary edge in enricher.

source
each_boundary_edge(tri::Triangulation) -> KeySet

Returns an iterator over the boundary edges of tri, in no specific order.

source