Names side by side¶
The same members, spelled for each language. C++ uses the names the header declares; Python uses snake_case, turns the three accessors into properties, and returns numpy arrays where C++ returns vectors.
C++ |
Python |
notes |
|---|---|---|
|
|
|
|
|
live objects, removals excluded |
|
|
|
|
|
property; a 3×2 array in Python |
|
|
property; a tuple in Python |
|
|
property |
|
|
|
|
|
the object itself excluded |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
returns the new index |
|
|
|
|
|
derives from |
|
|
derives from both |
What exists on one side only¶
Batched queries, Python only. The three point-taking queries also accept arrays of query points and answer them in one call. C++ has no equivalent and needs none: the cost batching removes is crossing the Python boundary, and a C++ caller writes a loop. The guide covers the form they return.
The index-taking overloads have no batched form in either language, their input being a single index.
Where the two behave differently¶
Nowhere, deliberately. The Python module is a thin binding: same guarantees,
same exceptions, same order of results, same closed interval Rmin <= d <= Rmax
on closeObjects / close_objects. What differs is only the shape of what
comes back — a numpy uint32 array in place of a std::vector<unsigned int>,
a tuple in place of a std::array — and that the Python arrays own their data
and are safe to keep after the grid is gone.