Package mvpa :: Package datasets :: 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=<function cartesianDistance at 0x8914144>)
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__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]
  filter_coord
Lets allow to specify some custom filter to use
  elementsize

Inherited from object: __class__

Method Details [hide private]

__init__(self, elementsize=1, distance_function=<function cartesianDistance at 0x8914144>)
(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

Property Details [hide private]

filter_coord

Lets allow to specify some custom filter to use
Get Method:
_getFilter(self) - Lets allow to specify some custom filter to use
Set Method:
_setFilter(self, filter_coord) - Lets allow to specify some custom filter to use

elementsize

Get Method:
unreachable(self)