Package topo :: Package sheet :: Module basic :: Class GeneratorSheet
[hide private]
[frames] | no frames]

Class GeneratorSheet

source code

                        object --+            
                                 |            
 param.parameterized.Parameterized --+        
                                     |        
        base.simulation.EventProcessor --+    
                                         |    
                            object --+   |    
                                     |   |    
base.sheetcoords.SheetCoordinateSystem --+    
                                         |    
                          base.sheet.Sheet --+
                                             |
                                            GeneratorSheet
Known Subclasses:

Sheet for generating a series of 2D patterns.

Typically generates the patterns by choosing parameters from a random distribution, but can use any mechanism.

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
 
set_input_generator(self, new_ig, push_existing=False)
Set the input_generator, overwriting the existing one by default.
source code
 
push_input_generator(self)
Push the current input_generator onto a stack for future retrieval.
source code
 
pop_input_generator(self)
Discard the current input_generator, and retrieve the previous one from the stack.
source code
 
generate(self)
Generate the output and send it out the Activity port.
source code
 
start(self)
Called by the simulation when the EventProcessor is added to the simulation.
source code
 
input_event(self, conn, data)
Called by the simulation when an EPConnectionEvent is delivered; the EventProcessor should process the data somehow.
source code

Inherited from base.sheet.Sheet: activity_len, override_plasticity_state, release_sheet_view, restore_plasticity_state, row_col_sheetcoords, sheet_cols, sheet_offset, sheet_rows, state_pop, state_push

Inherited from base.sheet.Sheet (private): _get_density

Inherited from base.simulation.EventProcessor: process_current_time, script_repr, send_output

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, set_dynamic_time_fn, verbose, warning

Inherited from base.sheetcoords.SheetCoordinateSystem: closest_cell_center, matrix2sheet, matrixidx2sheet, sheet2matrix, sheet2matrixidx, sheetcoordinates_of_matrixidx

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

Class Methods [hide private]

Inherited from param.parameterized.Parameterized: params, print_param_defaults

Class Variables [hide private]
  src_ports = ['Activity']
list() -> new list list(sequence) -> new list initialized from sequence's items
  period = param.Number(default= 1, bounds= (0, None), doc= "Del...
Delay (in Simulation time) between generating new input patterns.
  phase = param.Number(default= 0.05, doc= ...
Delay after the start of the Simulation (at time zero) before generating an input pattern.
  input_generator = param.ClassSelector(PatternGenerator, defaul...
Specifies a particular PatternGenerator type to use when creating patterns.
  output_fn = param.ClassSelector(OutputFn, default= IdentityOF(...
Output function to apply (if apply_output_fn is true) to this Sheet's activity.
  apply_output_fn = param.Boolean(default= True, doc= ...
Whether to apply the output_fn after computing an Activity matrix.

Inherited from base.sheet.Sheet: layout_location, nominal_bounds, nominal_density, plastic, precedence

Inherited from base.simulation.EventProcessor: dest_ports

Inherited from param.parameterized.Parameterized: name, print_level

Properties [hide private]

Inherited from base.sheet.Sheet: density

Inherited from base.sheetcoords.SheetCoordinateSystem: shape, xdensity, ydensity

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)

set_input_generator(self, new_ig, push_existing=False)

source code 

Set the input_generator, overwriting the existing one by default.

If push_existing is false, the existing input_generator is discarded permanently. Otherwise, the existing one is put onto a stack, and can later be restored by calling pop_input_generator.

pop_input_generator(self)

source code 

Discard the current input_generator, and retrieve the previous one from the stack.

Warns if no input_generator is available on the stack.

start(self)

source code 

Called by the simulation when the EventProcessor is added to the simulation.

If an EventProcessor needs to have any code run when it is added to the simulation, the code can be put into this method in the subclass.

Overrides: base.simulation.EventProcessor.start
(inherited documentation)

input_event(self, conn, data)

source code 
Called by the simulation when an EPConnectionEvent is delivered; the EventProcessor should process the data somehow.
Overrides: base.simulation.EventProcessor.input_event
(inherited documentation)

Class Variable Details [hide private]

period

Delay (in Simulation time) between generating new input patterns.
Value:
param.Number(default= 1, bounds= (0, None), doc= "Delay (in Simulation time) betwe\
en generating new input patterns.")

phase

Delay after the start of the Simulation (at time zero) before generating an input pattern. For a clocked, feedforward simulation, one would typically want to use a small nonzero phase and use delays less than the user-visible step size (typically 1.0), so that inputs are generated and processed before this step is complete.
Value:
param.Number(default= 0.05, doc= """
        Delay after the start of the Simulation (at time zero) before
        generating an input pattern.  For a clocked, feedforward simulation, 
        one would typically want to use a small nonzero phase and use delays less
        than the user-visible step size (typically 1.0), so that inputs are
        generated and processed before this step is complete.
        """)

input_generator

Specifies a particular PatternGenerator type to use when creating patterns.
Value:
param.ClassSelector(PatternGenerator, default= Constant(), doc= """Specifies a par\
ticular PatternGenerator type to use when creating patterns.""")

output_fn

Output function to apply (if apply_output_fn is true) to this Sheet's activity.
Value:
param.ClassSelector(OutputFn, default= IdentityOF(), doc= """
        Output function to apply (if apply_output_fn is true) to this Sheet's acti\
vity.""")

apply_output_fn

Whether to apply the output_fn after computing an Activity matrix.
Value:
param.Boolean(default= True, doc= """
        Whether to apply the output_fn after computing an Activity matrix.""")