-
Notifications
You must be signed in to change notification settings - Fork 52
add biased voronoi cells feature #593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
344d6de
6d85975
5969de0
618d3e1
40e899c
ef32aef
e80cea0
f5a8687
133ff92
fb13e75
c78a6c1
71feecd
9228ab4
a4b1323
db1a753
3c9523b
785f4e6
689665b
370158a
98009ba
ab3f73f
0ce8d91
cd65474
f17ab2a
d1de530
56458a8
376ff30
030d95f
e165531
75a6551
2fb9d47
affde15
c1d032a
ddf0e9e
d4e5e6c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1162,17 +1162,28 @@ cdef class Voronoi(_Compute): | |
| def __dealloc__(self): | ||
| del self.thisptr | ||
|
|
||
| def compute(self, system): | ||
| def compute(self, system, radii=None): | ||
| r"""Compute Voronoi diagram. | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to add a longer description of Voronoi diagrams and how this feature works. I think it might go best in the class docstring. It should include external links, formulas/equations, and descriptions of why someone would want to use this feature. It's important to include the several names for this feature so that it can be found via Google / documentation search. Please verify what type of weighted Voronoi diagram we are computing (additively weighted, multiplicatively weighted, or something else?), and cite whatever references you can find. You may need to refer to the voro++ documentation. |
||
| Args: | ||
| system: | ||
| Any object that is a valid argument to | ||
| :class:`freud.locality.NeighborQuery.from_system`. | ||
| radii ((:math:`N_{points}`) :class:`numpy.ndarray`): | ||
| An array of radii for each point in the system. If provided, | ||
| the power diagram (also called the radical Voronoi | ||
| tessellation) will be computed (Default value = :code:`None`, | ||
| which gives the Voronoi diagram). | ||
| """ | ||
| cdef NeighborQuery nq = NeighborQuery.from_system(system) | ||
| self.thisptr.compute(nq.get_ptr()) | ||
| self._box = nq.box | ||
| cdef double* l_radii_ptr = NULL | ||
| cdef double[::1] l_radii | ||
| if radii is not None: | ||
| l_radii = freud.util._convert_array( | ||
| radii, shape=(len(nq.points),), dtype=np.float64) | ||
| l_radii_ptr = &l_radii[0] | ||
| self.thisptr.compute(nq.get_ptr(), l_radii_ptr) | ||
| return self | ||
|
|
||
| @_Compute._computed_property | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.