Package pylal :: Module bayespputils :: Class KDTree
[hide private]
[frames] | no frames]

Class KDTree

source code

object --+
         |
        KDTree

A kD-tree.

Instance Methods [hide private]
 
__init__(self, objects)
Construct a kD-tree from a sequence of objects.
source code
 
_same_coords(self, objects)
True if and only if all the given objects have the same coordinates.
source code
 
_bounds_of_objects(self)
Bounds of the objects contained in the tree.
source code
 
_longest_dimension(self)
Longest dimension of the tree bounds.
source code
 
objects(self)
Returns the objects in the tree.
source code
 
__iter__(self)
Iterator over all the objects contained in the tree.
source code
 
left(self)
Returns the left tree.
source code
 
right(self)
Returns the right tree.
source code
 
split_dim(self)
Returns the dimension along which this level of the kD-tree splits.
source code
 
bounds(self)
Returns the coordinates of the lower-left and upper-right corners of the bounding box for this tree: low_left, up_right
source code
 
volume(self)
Returns the volume of the bounding box of the tree.
source code
 
integrate(self, f, boxing=64)
Returns the integral of f(objects) over the tree.
source code
 
operate(self, f, g, boxing=64)
Operates on tree nodes exceeding boxing parameter depth.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, objects)
(Constructor)

source code 

Construct a kD-tree from a sequence of objects. Each object should return its coordinates using obj.coord().

Overrides: object.__init__

integrate(self, f, boxing=64)

source code 

Returns the integral of f(objects) over the tree. The optional boxing parameter determines how deep to descend into the tree before computing f.