httk.analyse.generic.lower_hull

Generic lower convex-hull analysis for finite point-and-value collections.

Classes

LowerConvexHull

The lower convex hull of scalar values over arbitrary finite coordinates.

Module Contents

class httk.analyse.generic.lower_hull.LowerConvexHull(points, values, *, tolerance=1e-08)

The lower convex hull of scalar values over arbitrary finite coordinates.

A point belongs to the hull when its value is no greater than the cheapest leave-one-out convex mixture at the same coordinates, within tolerance. The input order is retained throughout, including for tied duplicate points.

Coordinates and values are converted through numpy.float64 and exposed as ordinary float values. Every coordinate equality is retained in the mixture LP, together with the affine sum(weights) == 1 equality.

Parameters:
Raises:

ValueError – If the points, values, or tolerance are invalid.

property points: tuple[tuple[float, Ellipsis], Ellipsis]

Return input coordinates in their original order as float tuples.

Returns:

The immutable input coordinate rows.

Return type:

tuple[tuple[float, Ellipsis], Ellipsis]

property values: tuple[float, Ellipsis]

Return input scalar values in the same order as points.

Returns:

The immutable input values.

Return type:

tuple[float, Ellipsis]

property hull_indices: tuple[int, Ellipsis]

Return indices of points on the lower hull in input order.

Returns:

The immutable lower-hull indices.

Return type:

tuple[int, Ellipsis]

property value_above_hull: tuple[float, Ellipsis]

Return non-negative leave-one-out value excesses for every input point.

Returns:

The immutable value excesses in input order.

Return type:

tuple[float, Ellipsis]

property supported_segments: tuple[tuple[int, int], Ellipsis]

Return midpoint-supported pairs of distinct lower-hull points.

Returns:

The immutable supported index pairs in input order.

Return type:

tuple[tuple[int, int], Ellipsis]

decomposition(index)

Return lower-hull mixture (index, weight) pairs, or None on hull.

Parameters:

index (int) – Input point index.

Returns:

The stable-point mixture, or None when the point is on the hull.

Return type:

tuple[tuple[int, float], Ellipsis] | None

is_on_hull(index)

Return whether index belongs to hull_indices.

Parameters:

index (int) – Input point index.

Returns:

Whether the point is on the lower hull.

Return type:

bool