54 cout <<
"[Aleph Geometry Example] " << title <<
"\n";
55 cout <<
"============================================================\n";
78 cout <<
"Diameter endpoints: ("
79 << diameter.first.get_x() <<
", " << diameter.first.get_y() <<
") <-> ("
80 << diameter.second.get_x() <<
", " << diameter.second.get_y() <<
")" <<
endl;
81 cout <<
"Diameter distance^2: " << diameter.distance_squared <<
endl;
82 cout <<
"Minimum width support edge: ("
83 << width.edge_first.get_x() <<
", " << width.edge_first.get_y() <<
") -> ("
84 << width.edge_second.get_x() <<
", " << width.edge_second.get_y() <<
")" <<
endl;
85 cout <<
"Antipodal vertex: (" << width.antipodal.get_x()
86 <<
", " << width.antipodal.get_y() <<
")" <<
endl;
87 cout <<
"Minimum width^2: " << width.width_squared <<
endl;
95 cout <<
"Validation OK for 8x3 rectangle." <<
endl;
96 cout <<
"STATUS: OK" <<
endl;
Represents a point with rectangular coordinates in a 2D plane.
A general (irregular) 2D polygon defined by a sequence of vertices.
void add_vertex(const Point &point)
Add a vertex to the polygon.
void close()
Close the polygon.
static DiameterResult diameter(const Polygon &poly)
Compute convex polygon diameter (farthest vertex pair).
static WidthResult minimum_width(const Polygon &poly)
Compute the minimum width of a closed convex polygon.
Computational geometry algorithms.
Main namespace for Aleph-w library functions.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.
static Polygon build_rect_8x3()
static void print_banner(const char *title)