Expand description
Container utilities and vertex sequence types.
Port of agg_array.h and agg_vertex_sequence.h.
Most of AGG’s C++ containers (pod_vector, pod_array, pod_bvector) map
directly to Rust’s Vec<T>. This module provides the algorithms and
specialized types that don’t have direct Rust equivalents.
Structs§
- Vertex
Dist - A vertex with coordinates and the distance to the next vertex.
Port of C++
vertex_dist. - Vertex
Dist Cmd - Like
VertexDistbut with an additional path command. Port of C++vertex_dist_cmd. - Vertex
Sequence - A sequence of vertices that automatically filters coincident points.
Constants§
- QUICK_
SORT_ THRESHOLD - Threshold below which quicksort switches to insertion sort.
Matches C++
quick_sort_threshold.
Functions§
- binary_
search_ pos - Binary search for the insertion position of
valin a sorted slice. Returns the index wherevalwould be inserted to maintain sort order. - invert_
container - Reverse the elements of a slice in place.
Port of C++
invert_container. - quick_
sort - Sort a mutable slice using AGG’s quicksort algorithm. Uses insertion sort for small partitions.
- remove_
duplicates - Remove duplicates from a sorted slice. Returns the number of remaining elements. The slice is modified in place (duplicates are overwritten, tail is unchanged).
- shorten_
path - Shorten a vertex sequence by removing
sdistance-units from the end.