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

Class Metric

source code


Abstract class for any finder.

Classes subclasses from this class show know about structure of the data and thus be able to provide information about the neighbors. At least one of the methods (getNeighbors, getNeighbor) has to be overriden in the derived class. NOTE: derived #2 from derived class #1 has to override all methods which were overrident in class #1

Instance Methods [hide private]
 
getNeighbors(self, *args, **kwargs)
Return the list of coordinates for the neighbors.
source code
 
getNeighbor(self, *args, **kwargs)
Generator to return coordinate of the neighbor.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getNeighbors(self, *args, **kwargs)

source code 

Return the list of coordinates for the neighbors.

By default it simply constracts the list based on the generator getNeighbor

getNeighbor(self, *args, **kwargs)

source code 

Generator to return coordinate of the neighbor.

Base class contains the simplest implementation, assuming that getNeighbors returns iterative structure to spit out neighbors 1-by-1