Package teamwork :: Package math :: Module KeyedVector :: Class SetToConstantRow
[hide private]
[frames] | no frames]

Class SetToConstantRow

source code

KeyedVector --+    
              |    
       DeltaRow --+
                  |
                 SetToConstantRow

A row that sets the value of a given feature to a specific value


Note: can possibly be abused to create a row that sets the value of one feature to a percentage of some other feature

Nested Classes [hide private]
  keyClass
A Key indicating the entry corresponding to a constant factor
Instance Methods [hide private]
 
__init__(self, args={}, sourceKey=None, deltaKey={}, value=0.0) source code
 
simpleText(self, numbers=True, all=False) source code

Inherited from DeltaRow: __copy__, __deepcopy__, __delitem__, __xml__, instantiate, instantiateKeys, parse

Inherited from KeyedVector: __add__, __eq__, __getitem__, __hash__, __len__, __mul__, __neg__, __rmul__, __setitem__, __str__, __sub__, addColumns, compose, fill, freeze, getArray, has_key, items, keys, normalize, setArray, unfreeze

Inherited from KeyedVector (private): _updateString

Class Variables [hide private]
  label = 'set to constant'
Instance Variables [hide private]

Inherited from KeyedVector (private): _array, _fresh, _frozen, _string

Method Details [hide private]

__init__(self, args={}, sourceKey=None, deltaKey={}, value=0.0)
(Constructor)

source code 
Parameters:
  • sourceKey (StateKey) - the feature to be changed
  • deltaKey (ConstantKey) - the Key for the value column; should be omitted
  • value (float) - the new value
Overrides: KeyedVector.__init__

simpleText(self, numbers=True, all=False)

source code 
Overrides: KeyedVector.simpleText