Package mvpa :: Package misc :: Module param :: Class Parameter
[hide private]
[frames] | no frames]

Class Parameter

source code


This class shall serve as a representation of a parameter.

It might be useful if a little more information than the pure parameter value is required (or even only useful).

Each parameter must have a value. However additional property can be passed to the constructor and will be stored in the object.

BIG ASSUMPTION: stored values are not mutable, ie nobody should do

cls.parameter1[:] = ...

or we wouldn't know that it was changed

Here is a list of possible property names:

min - minimum value max - maximum value step - increment/decrement stepsize
Instance Methods [hide private]
 
__init__(self, default, name=None, doc=None, **kwargs)
Specify a parameter by its default value and optionally an arbitrary number of additional parameters.
source code
 
__str__(self)
str(x)
source code
 
resetvalue(self)
Reset value to the default
source code
 
_set(self, val) source code
 
isDefault(self)
Returns True if current value is bound to default one
source code
 
equalDefault(self)
Returns True if current value is equal to default one
source code
 
setDefault(self, value) source code

Inherited from state.CollectableAttribute: isSet, reset

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

Class Variables [hide private]
  default = property(fget= lambda x: x.__default, fset= setDefault)
  value = property(fget= lambda x: x._value, fset= _set)

Inherited from state.CollectableAttribute: name

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, default, name=None, doc=None, **kwargs)
(Constructor)

source code 

Specify a parameter by its default value and optionally an arbitrary number of additional parameters.

TODO: :Parameters: for Parameter

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 
str(x)
Overrides: object.__str__
(inherited documentation)

_set(self, val)

source code 
Overrides: state.CollectableAttribute._set

isDefault(self)

source code 
Returns True if current value is bound to default one
Decorators:
  • @property

equalDefault(self)

source code 
Returns True if current value is equal to default one
Decorators:
  • @property