_qhull.pyi 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. '''
  2. Static type checking stub file for scipy/spatial/qhull.pyx
  3. '''
  4. import numpy as np
  5. from numpy.typing import ArrayLike, NDArray
  6. from typing import final
  7. class QhullError(RuntimeError):
  8. ...
  9. @final
  10. class _Qhull:
  11. # Read-only cython attribute that behaves, more or less, like a property
  12. @property
  13. def ndim(self) -> int: ...
  14. mode_option: bytes
  15. options: bytes
  16. furthest_site: bool
  17. def __init__(
  18. self,
  19. mode_option: bytes,
  20. points: NDArray[np.float64],
  21. options: None | bytes = ...,
  22. required_options: None | bytes = ...,
  23. furthest_site: bool = ...,
  24. incremental: bool = ...,
  25. interior_point: None | NDArray[np.float64] = ...,
  26. ) -> None: ...
  27. def check_active(self) -> None: ...
  28. def close(self) -> None: ...
  29. def get_points(self) -> NDArray[np.float64]: ...
  30. def add_points(
  31. self,
  32. points: ArrayLike,
  33. interior_point: ArrayLike = ...
  34. ) -> None: ...
  35. def get_paraboloid_shift_scale(self) -> tuple[float, float]: ...
  36. def volume_area(self) -> tuple[float, float]: ...
  37. def triangulate(self) -> None: ...
  38. def get_simplex_facet_array(self) -> tuple[
  39. NDArray[np.intc],
  40. NDArray[np.intc],
  41. NDArray[np.float64],
  42. NDArray[np.intc],
  43. NDArray[np.intc],
  44. ]: ...
  45. def get_hull_points(self) -> NDArray[np.float64]: ...
  46. def get_hull_facets(self) -> tuple[
  47. list[list[int]],
  48. NDArray[np.float64],
  49. ]: ...
  50. def get_voronoi_diagram(self) -> tuple[
  51. NDArray[np.float64],
  52. NDArray[np.intc],
  53. list[list[int]],
  54. list[list[int]],
  55. NDArray[np.intp],
  56. ]: ...
  57. def get_extremes_2d(self) -> NDArray[np.intc]: ...
  58. def _get_barycentric_transforms(
  59. points: NDArray[np.float64],
  60. simplices: NDArray[np.intc],
  61. eps: float
  62. ) -> NDArray[np.float64]: ...
  63. class _QhullUser:
  64. ndim: int
  65. npoints: int
  66. min_bound: NDArray[np.float64]
  67. max_bound: NDArray[np.float64]
  68. def __init__(self, qhull: _Qhull, incremental: bool = ...) -> None: ...
  69. def close(self) -> None: ...
  70. def _update(self, qhull: _Qhull) -> None: ...
  71. def _add_points(
  72. self,
  73. points: ArrayLike,
  74. restart: bool = ...,
  75. interior_point: ArrayLike = ...
  76. ) -> None: ...
  77. class Delaunay(_QhullUser):
  78. furthest_site: bool
  79. paraboloid_scale: float
  80. paraboloid_shift: float
  81. simplices: NDArray[np.intc]
  82. neighbors: NDArray[np.intc]
  83. equations: NDArray[np.float64]
  84. coplanar: NDArray[np.intc]
  85. good: NDArray[np.intc]
  86. nsimplex: int
  87. vertices: NDArray[np.intc]
  88. def __init__(
  89. self,
  90. points: ArrayLike,
  91. furthest_site: bool = ...,
  92. incremental: bool = ...,
  93. qhull_options: None | str = ...
  94. ) -> None: ...
  95. def _update(self, qhull: _Qhull) -> None: ...
  96. def add_points(
  97. self,
  98. points: ArrayLike,
  99. restart: bool = ...
  100. ) -> None: ...
  101. @property
  102. def points(self) -> NDArray[np.float64]: ...
  103. @property
  104. def transform(self) -> NDArray[np.float64]: ...
  105. @property
  106. def vertex_to_simplex(self) -> NDArray[np.intc]: ...
  107. @property
  108. def vertex_neighbor_vertices(self) -> tuple[
  109. NDArray[np.intc],
  110. NDArray[np.intc],
  111. ]: ...
  112. @property
  113. def convex_hull(self) -> NDArray[np.intc]: ...
  114. def find_simplex(
  115. self,
  116. xi: ArrayLike,
  117. bruteforce: bool = ...,
  118. tol: float = ...
  119. ) -> NDArray[np.intc]: ...
  120. def plane_distance(self, xi: ArrayLike) -> NDArray[np.float64]: ...
  121. def lift_points(self, x: ArrayLike) -> NDArray[np.float64]: ...
  122. def tsearch(tri: Delaunay, xi: ArrayLike) -> NDArray[np.intc]: ...
  123. def _copy_docstr(dst: object, src: object) -> None: ...
  124. class ConvexHull(_QhullUser):
  125. simplices: NDArray[np.intc]
  126. neighbors: NDArray[np.intc]
  127. equations: NDArray[np.float64]
  128. coplanar: NDArray[np.intc]
  129. good: None | NDArray[np.bool_]
  130. volume: float
  131. area: float
  132. nsimplex: int
  133. def __init__(
  134. self,
  135. points: ArrayLike,
  136. incremental: bool = ...,
  137. qhull_options: None | str = ...
  138. ) -> None: ...
  139. def _update(self, qhull: _Qhull) -> None: ...
  140. def add_points(self, points: ArrayLike,
  141. restart: bool = ...) -> None: ...
  142. @property
  143. def points(self) -> NDArray[np.float64]: ...
  144. @property
  145. def vertices(self) -> NDArray[np.intc]: ...
  146. class Voronoi(_QhullUser):
  147. vertices: NDArray[np.float64]
  148. ridge_points: NDArray[np.intc]
  149. ridge_vertices: list[list[int]]
  150. regions: list[list[int]]
  151. point_region: NDArray[np.intp]
  152. furthest_site: bool
  153. def __init__(
  154. self,
  155. points: ArrayLike,
  156. furthest_site: bool = ...,
  157. incremental: bool = ...,
  158. qhull_options: None | str = ...
  159. ) -> None: ...
  160. def _update(self, qhull: _Qhull) -> None: ...
  161. def add_points(
  162. self,
  163. points: ArrayLike,
  164. restart: bool = ...
  165. ) -> None: ...
  166. @property
  167. def points(self) -> NDArray[np.float64]: ...
  168. @property
  169. def ridge_dict(self) -> dict[tuple[int, int], list[int]]: ...
  170. class HalfspaceIntersection(_QhullUser):
  171. interior_point: NDArray[np.float64]
  172. dual_facets: list[list[int]]
  173. dual_equations: NDArray[np.float64]
  174. dual_points: NDArray[np.float64]
  175. dual_volume: float
  176. dual_area: float
  177. intersections: NDArray[np.float64]
  178. ndim: int
  179. nineq: int
  180. def __init__(
  181. self,
  182. halfspaces: ArrayLike,
  183. interior_point: ArrayLike,
  184. incremental: bool = ...,
  185. qhull_options: None | str = ...
  186. ) -> None: ...
  187. def _update(self, qhull: _Qhull) -> None: ...
  188. def add_halfspaces(
  189. self,
  190. halfspaces: ArrayLike,
  191. restart: bool = ...
  192. ) -> None: ...
  193. @property
  194. def halfspaces(self) -> NDArray[np.float64]: ...
  195. @property
  196. def dual_vertices(self) -> NDArray[np.integer]: ...