Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALInference 4.1.9.1-00ddc7f
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
lalinference.bayespputils.KDTree Class Reference

Detailed Description

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...
 

Constructor & Destructor Documentation

◆ __init__()

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.

Member Function Documentation

◆ objects()

def lalinference.bayespputils.KDTree.objects (   self)

Returns the objects in the tree.

Definition at line 2417 of file bayespputils.py.

◆ __iter__()

def lalinference.bayespputils.KDTree.__iter__ (   self)

Iterator over all the objects contained in the tree.

Definition at line 2423 of file bayespputils.py.

◆ left()

def lalinference.bayespputils.KDTree.left (   self)

Returns the left tree.

Definition at line 2429 of file bayespputils.py.

◆ right()

def lalinference.bayespputils.KDTree.right (   self)

Returns the right tree.

Definition at line 2435 of file bayespputils.py.

◆ split_dim()

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.

◆ bounds()

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.

◆ volume()

def lalinference.bayespputils.KDTree.volume (   self)

Returns the volume of the bounding box of the tree.

Definition at line 2455 of file bayespputils.py.

◆ integrate()

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.

◆ operate()

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.