Révision 111 pobysoPythonSage/src/sageSLZ/sageMatrixOperations.sage
sageMatrixOperations.sage (revision 111) | ||
---|---|---|
116 | 116 |
return(varDeclarationString, varListArrayDeclaration) |
117 | 117 |
# End smo_transformation_row_matrix_strings. |
118 | 118 |
|
119 |
def smo_triangular_matrix_determinant(matrix): |
|
120 |
if matrix == None: |
|
121 |
return None |
|
122 |
numRows = matrix.nrows() |
|
123 |
if numRows < 1: |
|
124 |
return 0 |
|
125 |
determinant = 1 |
|
126 |
for rowIndex in xrange(numRows): |
|
127 |
determinant *= matrix[rowIndex, rowIndex] |
|
128 |
return determinant |
|
129 |
# End smo_triangular_matrix_determinant |
|
130 |
# |
|
119 | 131 |
def smo_zero_rows_index_list(matrix): |
120 | 132 |
""" |
121 | 133 |
Compute the list of indices of the rows that have a 0 norm. |
Formats disponibles : Unified diff