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

Class Selector

source code


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

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
function(self, p)
Selects and returns one of the patterns in the list.
source code
 
get_current_generator(self)
Return the current generator (as specified by self.index).
source code

Inherited from base.patterngenerator.PatternGenerator: __call__

Inherited from param.parameterized.Parameterized: __getstate__, __init__, __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, state_pop, state_push, 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]
  generators = param.List(precedence= 0.97, class_= PatternGener...
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= numbergen.UniformRandom(lbound= ...
Index into the list of pattern generators, on a scale from 0 (start of the list) to 1.0 (end of the list).
  name = <param.parameterized.String object at 0xb1eab6c>
String identifier for this object.

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

Inherited from param.parameterized.Parameterized: print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

function(self, p)

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(precedence= 0.97, class_= PatternGenerator, bounds= (1, None), default=\
 [Disk(x=-0.3, aspect_ratio= 0.5), Rectangle(x= 0.3, aspect_ratio= 0.5)], doc= "Li\
st 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= numbergen.UniformRandom(lbound= 0, ubound= 1.0, seed= 76), b\
ounds= (-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.""")