Package topo :: Package pattern :: Module basic :: Class Selector
[hide private]
[frames] | no frames]

Class Selector

source code

                        object --+        
                                 |        
 param.parameterized.Parameterized --+    
                                     |    
base.patterngenerator.PatternGenerator --+
                                         |
                                        Selector

PatternGenerator that selects from a list of other PatternGenerators.
Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
__init__(self, generators=[Disk(aspect_ratio=0.5, bounds=BoundingBox(radius=0.5), mask=N..., **params)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
function(self, params)
Selects and returns one of the patterns in the list.
source code

Inherited from base.patterngenerator.PatternGenerator: __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_dynamic_time_fn, state_pop, state_push, verbose, warning

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]
  generators = param.List(default= [Constant()], precedence= 0.9...
List of patterns from which to select.
  size = param.Number(default= 1.0, doc= "Scaling factor applied...
Scaling factor applied to all sub-patterns.
  index = param.Number(default= UniformRandom(lbound= 0, ubound=...
Index into the list of pattern generators, on a scale from 0 (start of the list) to 1.0 (end of the list).

Inherited from base.patterngenerator.PatternGenerator: bounds, mask, mask_shape, offset, orientation, output_fn, position, scale, x, xdensity, y, ydensity

Inherited from param.parameterized.Parameterized: name, print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, generators=[Disk(aspect_ratio=0.5, bounds=BoundingBox(radius=0.5), mask=N..., **params)
(Constructor)

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

function(self, params)

source code 
Selects and returns one of the patterns in the list.
Overrides: base.patterngenerator.PatternGenerator.function

Class Variable Details [hide private]

generators

List of patterns from which to select.
Value:
param.List(default= [Constant()], precedence= 0.97, class_= PatternGenerator, boun\
ds= (1, None), doc= "List of patterns from which to select.")

size

Scaling factor applied to all sub-patterns.
Value:
param.Number(default= 1.0, doc= "Scaling factor applied to all sub-patterns.")

index

Index into the list of pattern generators, on a scale from 0 (start of the list) to 1.0 (end of the list). Typically a random value or other number generator, to allow a different item to be selected each time.
Value:
param.Number(default= UniformRandom(lbound= 0, ubound= 1.0, seed= 76), bounds= (-1\
.0, 1.0), precedence= 0.20, doc= """
        Index into the list of pattern generators, on a scale from 0
        (start of the list) to 1.0 (end of the list).  Typically a
        random value or other number generator, to allow a different item
        to be selected each time.""")