Package topo :: Package transferfn :: Module basic :: Class TransferFnWithRandomState
[hide private]
[frames] | no frames]

Class TransferFnWithRandomState

source code


Abstract base class for TransferFns that use a random number generator.
Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
__init__(self, **params)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
state_push(self)
Save the current random number generator (onto the stack), replacing it with a copy.
source code
 
state_pop(self)
Retrieve the previous random number generator from the stack.
source code

Inherited from TransferFnWithState: override_plasticity_state, restore_plasticity_state

Inherited from base.functionfamily.TransferFn: __call__

Inherited from param.parameterized.Parameterized: __getstate__, __repr__, __setstate__, __str__, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, script_repr, set_default, set_dynamic_time_fn, set_param, verbose, warning

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

Class Methods [hide private]

Inherited from param.parameterized.Parameterized: params, print_param_defaults

Class Variables [hide private]
  random_generator = param.Parameter(default= numpy.random.Rando...
numpy's RandomState provides methods for generating random numbers (see RandomState's help for more information).
  __abstract = True
bool(x) -> bool
  name = <param.parameterized.String object at 0xb5896ac>
String identifier for this object.

Inherited from TransferFnWithState: plastic

Inherited from base.functionfamily.TransferFn: norm_value

Inherited from param.parameterized.Parameterized: print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **params)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

state_push(self)

source code 
Save the current random number generator (onto the stack), replacing it with a copy.
Overrides: param.parameterized.Parameterized.state_push

state_pop(self)

source code 
Retrieve the previous random number generator from the stack.
Overrides: param.parameterized.Parameterized.state_pop

Class Variable Details [hide private]

random_generator

numpy's RandomState provides methods for generating random numbers (see RandomState's help for more information).

Note that all instances of subclasses of TransferFnWithRandomState will share this RandomState object, and hence its state. To create an instance of an TransferFnWithRandomState subclass that has its own state, set this parameter on the instance to a new RandomState instance.

Value:
param.Parameter(default= numpy.random.RandomState(seed= (10, 10)), doc= """
        numpy's RandomState provides methods for generating random
        numbers (see RandomState's help for more information).

        Note that all instances of subclasses of
        TransferFnWithRandomState will share this RandomState object,
        and hence its state. To create an instance of an
        TransferFnWithRandomState subclass that has its own state, set
...

__abstract

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

Value:
True