ConvexHull2D#
- class pyopenms.ConvexHull2D#
Bases:
object
Cython implementation of _ConvexHull2D
Original C++ documentation is available here
- __init__()#
Overload:
- __init__(self) None
Overload:
- __init__(self, in_0: ConvexHull2D) None
Methods
Overload:
addPoint
(self, point)Adds a point to the hull if it is not already contained.
Parameters: x (double) y (double)
addPoints
(self, points)Adds points to the hull if it is not already contained.
Parameters: points (np.ndarray[np.float32_t, ndim=2])
clear
(self)Removes all points
compress
(self)Allows to reduce the disk/memory footprint of a hull
encloses
(self, in_0)Returns if the point lies in the feature hull
Parameters: x (float) y (float)
expandToBoundingBox
(self)Expand a convex hull to its bounding box.
getBoundingBox
(self)Returns the bounding box of the feature hull points
Returns: ((double,double),(double,double))
getHullPoints
(self)Accessor for the outer points
Returns: result (np.ndarray[np.float32_t, ndim=2])
setHullPoints
(self, in_0)Accessor for the outer(!) points (no checking is performed if this is actually a convex hull)
Parameters: points (np.ndarray[np.float32_t, ndim=2])
- addPoint(self, point: Sequence[int] | Sequence[float]) bool #
Adds a point to the hull if it is not already contained. Returns if the point was added. This will trigger recomputation of the outer hull points (thus points set with setHullPoints() will be lost)
- addPointXY()#
Parameters: x (double) y (double)
- addPoints(self, points: '_np.ndarray[Any, _np.dtype[_np.float32]]') None #
Adds points to the hull if it is not already contained. This will trigger recomputation of the outer hull points (thus points set with setHullPoints() will be lost)
- addPointsNPY()#
Parameters: points (np.ndarray[np.float32_t, ndim=2])
- clear(self) None #
Removes all points
- compress(self) int #
Allows to reduce the disk/memory footprint of a hull
- encloses(self, in_0: Sequence[int] | Sequence[float]) bool #
Returns if the point lies in the feature hull
- enclosesXY()#
Parameters: x (float) y (float)
Returns: int
- expandToBoundingBox(self) None #
Expand a convex hull to its bounding box.
- getBoundingBox(self) DBoundingBox2 #
Returns the bounding box of the feature hull points
- getBoundingBox2D()#
Returns: ((double,double),(double,double))
- getHullPoints(self) '_np.ndarray[Any, _np.dtype[_np.float32]]' #
Accessor for the outer points
- getHullPointsNPY()#
Returns: result (np.ndarray[np.float32_t, ndim=2])
- setHullPoints(self, in_0: '_np.ndarray[Any, _np.dtype[_np.float32]]') None #
Accessor for the outer(!) points (no checking is performed if this is actually a convex hull)
- setHullPointsNPY()#
Parameters: points (np.ndarray[np.float32_t, ndim=2])