A kD-tree.
Definition at line 2345 of file bayespputils.py.
Inherits object.
Public Member Functions | |
| def | __init__ (self, objects) |
| Construct a kD-tree from a sequence of objects. More... | |
| def | objects (self) |
| Returns the objects in the tree. More... | |
| def | __iter__ (self) |
| Iterator over all the objects contained in the tree. More... | |
| def | left (self) |
| Returns the left tree. More... | |
| def | right (self) |
| Returns the right tree. More... | |
| def | split_dim (self) |
| Returns the dimension along which this level of the kD-tree splits. More... | |
| def | bounds (self) |
| Returns the coordinates of the lower-left and upper-right corners of the bounding box for this tree: low_left, up_right. More... | |
| def | volume (self) |
| Returns the volume of the bounding box of the tree. More... | |
| def | integrate (self, f, boxing=64) |
| Returns the integral of f(objects) over the tree. More... | |
| def | operate (self, f, g, boxing=64) |
| Operates on tree nodes exceeding boxing parameter depth. More... | |
| def lalinference.bayespputils.KDTree.__init__ | ( | self, | |
| objects | |||
| ) |
Construct a kD-tree from a sequence of objects.
Each object should return its coordinates using obj.coord().
Definition at line 2350 of file bayespputils.py.
| def lalinference.bayespputils.KDTree.objects | ( | self | ) |
Returns the objects in the tree.
Definition at line 2417 of file bayespputils.py.
| def lalinference.bayespputils.KDTree.__iter__ | ( | self | ) |
Iterator over all the objects contained in the tree.
Definition at line 2423 of file bayespputils.py.
| def lalinference.bayespputils.KDTree.left | ( | self | ) |
Returns the left tree.
Definition at line 2429 of file bayespputils.py.
| def lalinference.bayespputils.KDTree.right | ( | self | ) |
Returns the right tree.
Definition at line 2435 of file bayespputils.py.
| def lalinference.bayespputils.KDTree.split_dim | ( | self | ) |
Returns the dimension along which this level of the kD-tree splits.
Definition at line 2442 of file bayespputils.py.
| def lalinference.bayespputils.KDTree.bounds | ( | self | ) |
Returns the coordinates of the lower-left and upper-right corners of the bounding box for this tree: low_left, up_right.
Definition at line 2449 of file bayespputils.py.
| def lalinference.bayespputils.KDTree.volume | ( | self | ) |
Returns the volume of the bounding box of the tree.
Definition at line 2455 of file bayespputils.py.
| def lalinference.bayespputils.KDTree.integrate | ( | self, | |
| f, | |||
boxing = 64 |
|||
| ) |
Returns the integral of f(objects) over the tree.
The optional boxing parameter determines how deep to descend into the tree before computing f.
Definition at line 2467 of file bayespputils.py.
| def lalinference.bayespputils.KDTree.operate | ( | self, | |
| f, | |||
| g, | |||
boxing = 64 |
|||
| ) |
Operates on tree nodes exceeding boxing parameter depth.
Definition at line 2484 of file bayespputils.py.