54 cout <<
"[Aleph Geometry Example] " << title <<
"\n";
55 cout <<
"============================================================\n";
73 const auto circle =
mec(
pts);
75 cout <<
"Center: (" << circle.center.get_x() <<
", "
76 << circle.center.get_y() <<
")" <<
endl;
77 cout <<
"Radius: " << circle.radius() <<
endl;
78 cout <<
"Radius^2: " << circle.radius_squared <<
endl;
84 const Point & p = it.get_curr();
85 const bool inside = circle.contains(p);
86 cout <<
" (" << p.
get_x() <<
", " << p.
get_y() <<
") -> "
93 cout <<
"All points contained: YES" <<
endl;
97 cout <<
"\nSquare test: center = (" <<
c2.center.get_x() <<
", "
98 <<
c2.center.get_y() <<
"), radius = " <<
c2.radius() <<
endl;
102 cout <<
"STATUS: OK" <<
endl;
Iterator on the items of list.
Dynamic singly linked list with functional programming support.
T & append(const T &item)
bool has_curr() const noexcept
Smallest circle enclosing a point set (Welzl's algorithm).
Represents a point with rectangular coordinates in a 2D plane.
const Geom_Number & get_x() const noexcept
Gets the x-coordinate value.
const Geom_Number & get_y() const noexcept
Gets the y-coordinate value.
Computational geometry algorithms.
static void print_banner(const char *title)
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.