Jump to content

Reduced row echelon form: Difference between revisions

m
Used "<M" and "<N" in "toMatrix" instead of "a.high" and "a[0].high".
m (Used "<M" and "<N" in "toMatrix" instead of "a.high" and "a[0].high".)
Line 2,569:
## Convert a matrix of integers to a matrix of integer fractions.
 
for i in 0..a.high<M:
for j in 0..a[0].high<N:
result[i][j] = a[i][j] // 1
 
Line 2,717:
func toMatrix[M, N: static Positive](a: array[M, array[N, int]]): Matrix[M, N] =
## Convert a matrix of integers to a matrix of floats.
for i in 0..a.high<M:
for j in 0..a[0].high<N:
result[i][j] = a[i][j].toFloat
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.