Package topo :: Package patterns :: Module random :: Class RandomGenerator
[hide private]
[frames] | no frames]

Class RandomGenerator

source code

                                  object --+        
                                           |        
base.parameterizedobject.ParameterizedObject --+    
                                               |    
          base.patterngenerator.PatternGenerator --+
                                                   |
                                                  RandomGenerator
Known Subclasses:
GaussianRandom, UniformRandom

2D random noise pattern generator abstract class.

Nested Classes [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: __metaclass__

Instance Methods [hide private]
 
_distrib(self, shape, pos)
Method for subclasses to override with a particular random distribution.
source code
 
__call__(self, **params_to_override)
Call the subclasses 'function' method on a rotated and scaled coordinate system.
source code

Inherited from base.patterngenerator.PatternGenerator: function

Inherited from base.parameterizedobject.ParameterizedObject: __getstate__, __init__, __repr__, __setstate__, __str__, as_uninitialized, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, script_repr, verbose, warning

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

Class Methods [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: params, print_param_defaults

Class Variables [hide private]
  __abstract = True
bool(x) -> bool
  x = Number(precedence=-1)
X-coordinate location of pattern center.
  y = Number(precedence=-1)
Y-coordinate location of pattern center.
  size = Number(precedence=-1)
Determines the overall size of the pattern.
  orientation = <topo.base.parameterclasses.Number object at 0xa...
Polar angle of pattern, i.e., the orientation in the Cartesian coordinate system, with zero at 3 o'clock and increasing counterclockwise.

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

Inherited from base.parameterizedobject.ParameterizedObject: name, print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self, **params_to_override)
(Call operator)

source code 

Call the subclasses 'function' method on a rotated and scaled coordinate system.

Creates and fills an array with the requested pattern. If called without any params, uses the values for the Parameters as currently set on the object. Otherwise, any params specified override those currently set on the object.

Overrides: base.patterngenerator.PatternGenerator.__call__
(inherited documentation)

Class Variable Details [hide private]

__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

orientation

Polar angle of pattern, i.e., the orientation in the Cartesian coordinate system, with zero at 3 o'clock and increasing counterclockwise.
Value:
Number(precedence=-1)