new empty dictionary
|
__init__(self,
args={})
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
Key[]
|
|
|
Key[]
|
|
|
int
|
colOrder(self,
key)
Returns:
the position of the given key within the columns of this matrix |
source code
|
|
|
|
set(self,
row,
col,
value)
Sets an individual value in this matrix |
source code
|
|
int
|
|
|
|
|
|
boolean
|
|
|
|
|
array
|
|
|
|
|
|
|
|
|
|
|
|
|
fill(self,
keys,
value=None)
Fills in any missing rows and columns with a default value |
source code
|
|
|
|
freeze(self)
Locks in the dimensions and keys of this matrix |
source code
|
|
|
|
unfreeze(self)
Unlocks the dimensions and keys of this matrix |
source code
|
|
|
a new KeyedMatrix instance
|
compose(self,
other,
op)
Composes the two matrices together using the given operator |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_multiplyByOther(self,
other)
Handles multiplication when multiplicand is something unknown class
(typically, float) |
source code
|
|
|
KeyedMatrix
|
copyFromArray(self,
matrix)
Copies all aspects of this array (keys, etc.) except for the
numerical value, which is taken fom the given matrix |
source code
|
|
|
|
|
|
|
|
|
KeyedMatrix
|
merge(self,
other)
Merges rows from the two matrices (if any row keys are common, then
the new row is used) |
source code
|
|
|
|
instantiate(self,
table)
Substitutes values for any abstract references, using the given
substitution table |
source code
|
|
|
|
|
|
|
|
|
|
parse(self,
element)
Extracts the distribution from the given XML element |
source code
|
|
str
|
simpleText(self,
numbers=True,
all=False)
Returns:
a more user-friendly string representation of this matrix |
source code
|
|
|
|
|
|
|
|
|
Inherited from dict:
__cmp__,
__contains__,
__eq__,
__ge__,
__getattribute__,
__getitem__,
__gt__,
__iter__,
__le__,
__len__,
__lt__,
__ne__,
__new__,
__repr__,
clear,
copy,
fromkeys,
get,
has_key,
items,
iteritems,
iterkeys,
itervalues,
keys,
pop,
popitem,
setdefault,
update,
values
Inherited from object:
__delattr__,
__reduce__,
__reduce_ex__,
__setattr__,
__str__
|