Package teamwork :: Package math :: Module KeyedMatrix
[hide private]
[frames] | no frames]

Module KeyedMatrix

source code

Classes for matrices with symbolic indices (i.e., Key objects)

Classes [hide private]
  KeyedMatrix
A dictionary-based representation of a two-dimensional matrix
  DynamicsMatrix
Matrix subclass that provides some structure to be exploited for greater user friendliness
  IncrementMatrix
A matrix for incrementing/decrementing the value of a given feature by a constant amount
  ScaleMatrix
A matrix for incrementing/decrementing the value of a given feature by some percentage of another feature (possibly the same one)
  SetToConstantMatrix
A matrix for setting the value of a given feature to a specified constant value
  SetToFeatureMatrix
A matrix for setting the value of a given feature to a specified percentage of some other feature
  ActionCountMatrix
A matrix for setting the value of a given feature to a count of a certain type of action
  IdentityMatrix
A matrix for leaving the value of a given feature unchanged
Functions [hide private]
dict:str->class
getDynamicsTypes()
Automatic extraction of possible DynamicsMatrix subclasses
source code
KeyedMatrix
makeIdentityMatrix(keys)
Generates an identity matrix, M, over the set of keys.
source code
Variables [hide private]
  dynamicsTypes = {'action count': <class 'teamwork.math.KeyedMa...
  EMPTY_NAMESPACE = None
  EMPTY_PREFIX = None
  StringTypes = (<type 'str'>, <type 'unicode'>)
  XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'
Function Details [hide private]

getDynamicsTypes()

source code 

Automatic extraction of possible DynamicsMatrix subclasses

Returns: dict:str->class
all available subclasses of DynamicsMatrix

makeIdentityMatrix(keys)

source code 

Generates an identity matrix, M, over the set of keys. This matrix is filled and frozen.

Parameters:
  • keys (Key[]) - the keys of the vector, v, for which we want M*v=v
Returns: KeyedMatrix

Variables Details [hide private]

dynamicsTypes

Value:
{'action count': <class 'teamwork.math.KeyedMatrix.ActionCountMatrix'>\
,
 'add constant': <class 'teamwork.math.KeyedMatrix.IncrementMatrix'>,
 'add feature': <class 'teamwork.math.KeyedMatrix.ScaleMatrix'>,
 'no change': <class 'teamwork.math.KeyedMatrix.IdentityMatrix'>,
 'set to constant': <class 'teamwork.math.KeyedMatrix.SetToConstantMat\
rix'>,
 'set to feature': <class 'teamwork.math.KeyedMatrix.SetToFeatureMatri\
...