ConvexHull2D

class pyopenms.ConvexHull2D

Bases: object

Cython implementation of _ConvexHull2D

Documentation is available at http://www.openms.de/current_doxygen/html/classOpenMS_1_1ConvexHull2D.html

__init__()
  • Cython signature: void ConvexHull2D()

  • Cython signature: void ConvexHull2D(ConvexHull2D &)

Methods

__init__

  • Cython signature: void ConvexHull2D()

addPoint

Cython signature: bool addPoint(DPosition2 point) Adds a point to the hull if it is not already contained.

addPointXY

Parameters: x (double) y (double)

addPoints

Cython signature: void addPoints(libcpp_vector[DPosition2] points) Adds points to the hull if it is not already contained.

addPointsNPY

Parameters: points (np.ndarray[np.float32_t, ndim=2])

clear

Cython signature: void clear() Removes all points

compress

Cython signature: size_t compress() Allows to reduce the disk/memory footprint of a hull

encloses

Cython signature: bool encloses(DPosition2) Returns if the point lies in the feature hull

enclosesXY

Parameters: x (float) y (float)

expandToBoundingBox

Cython signature: void expandToBoundingBox() Expand a convex hull to its bounding box.

getBoundingBox

Cython signature: DBoundingBox2 getBoundingBox() Returns the bounding box of the feature hull points

getBoundingBox2D

Returns: ((double,double),(double,double))

getHullPoints

Cython signature: libcpp_vector[DPosition2] getHullPoints() Accessor for the outer points

getHullPointsNPY

Returns: result (np.ndarray[np.float32_t, ndim=2])

setHullPoints

Cython signature: void setHullPoints(libcpp_vector[DPosition2]) 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])

addPoint()

Cython signature: bool addPoint(DPosition2 point) 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()

Cython signature: void addPoints(libcpp_vector[DPosition2] points) 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()

Cython signature: void clear() Removes all points

compress()

Cython signature: size_t compress() Allows to reduce the disk/memory footprint of a hull

encloses()

Cython signature: bool encloses(DPosition2) Returns if the point lies in the feature hull

enclosesXY()

Parameters: x (float) y (float)

Returns: int

expandToBoundingBox()

Cython signature: void expandToBoundingBox() Expand a convex hull to its bounding box.

getBoundingBox()

Cython signature: DBoundingBox2 getBoundingBox() Returns the bounding box of the feature hull points

getBoundingBox2D()

Returns: ((double,double),(double,double))

getHullPoints()

Cython signature: libcpp_vector[DPosition2] getHullPoints() Accessor for the outer points

getHullPointsNPY()

Returns: result (np.ndarray[np.float32_t, ndim=2])

setHullPoints()

Cython signature: void setHullPoints(libcpp_vector[DPosition2]) 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])