Package mvpa :: Package mappers :: Module metric :: Class DescreteMetric
[hide private]
[frames] | no frames]

Class DescreteMetric

source code


Find neighboring points in descretized space

If input space is descretized and all points fill in N-dimensional cube, this finder returns list of neighboring points for a given distance.

As input points it operates on discretized values, not absolute coordinates (which are e.g. in mm)

Instance Methods [hide private]
 
__init__(self, elementsize=1, distance_function=cartesianDistance)
Initialize the class provided @elementsize and @distance_function
source code
 
_computeFilter(self, radius)
(Re)Computer filter_coord based on given radius
source code
 
getNeighbors(self, origin, radius=0)
Returns coordinates of the neighbors which are within distance from coord
source code
 
_setFilter(self, filter_coord)
Lets allow to specify some custom filter to use
source code
 
_getFilter(self)
Lets allow to specify some custom filter to use
source code

Inherited from Metric: getNeighbor

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

Class Variables [hide private]
  filter_coord = property(fget= _getFilter, fset= _setFilter)
  elementsize = property(fget= lambda self: self.__elementsize)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, elementsize=1, distance_function=cartesianDistance)
(Constructor)

source code 
Initialize the class provided @elementsize and @distance_function
Overrides: object.__init__

getNeighbors(self, origin, radius=0)

source code 

Returns coordinates of the neighbors which are within distance from coord

XXX radius might need to be not a scalar but a vector of scalars to specify search distance in different dimensions differently... but then may be it has to be a tensor to specify orientation etc? :-) so it might not be necessary for now

Overrides: Metric.getNeighbors