def getMatrixTetragridM(matrixTetragrid, prefix, xmlElement):
 matrixKeys = getMatrixKeys(prefix)
 evaluatedDictionary = evaluate.getEvaluatedDictionary(matrixKeys, xmlElement)
 if (len(evaluatedDictionary.keys()) < 1):
  return matrixTetragrid
 for row in xrange(4):
  for column in xrange(4):
   key = getMatrixKey(row, column, prefix)
   if (key in evaluatedDictionary):
    value = evaluatedDictionary[key]
    if ((value == None) or (value == 'None')):
     print 'Warning, value in getMatrixTetragridM in matrix is None for key for dictionary:'
     print key
     print evaluatedDictionary
    else:
     matrixTetragrid = getIdentityMatrixTetragrid(matrixTetragrid)
     matrixTetragrid[row][column] = float(value)
 euclidean.removeListFromDictionary(xmlElement.attributeDictionary, matrixKeys)
 return matrixTetragrid

def getMatrixTetragridM ( matrixTetragrid , prefix , xmlElement ) : matrixKeys = getMatrixKeys ( prefix ) evaluatedDictionary = evaluate . getEvaluatedDictionary ( matrixKeys , xmlElement ) if ( len ( evaluatedDictionary . keys ( ) ) < 1 ) : return matrixTetragrid for row in xrange ( 4 ) : for column in xrange ( 4 ) : key = getMatrixKey ( row , column , prefix ) if ( key in evaluatedDictionary ) : value = evaluatedDictionary [ key ] if ( ( value == None ) or ( value == 'None' ) ) : print 'Warning, value in getMatrixTetragridM in matrix is None for key for dictionary:' print key print evaluatedDictionary else : matrixTetragrid = getIdentityMatrixTetragrid ( matrixTetragrid ) matrixTetragrid [ row ] [ column ] = float ( value ) euclidean . removeListFromDictionary ( xmlElement . attributeDictionary , matrixKeys ) return matrixTetragrid
get the matrix tetragrid from the xmlelement m values .