Merge pull request #141 from adrianVmariano/master

Updates to solvers.
This commit is contained in:
Revar Desmera 2020-03-17 20:57:27 -07:00 committed by GitHub
commit f1c0e2f89f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -646,7 +646,7 @@ function back_substitute(R, b, x=[],transpose = false) =
assert(is_matrix(R, square=true))
let(n=len(R))
assert(is_vector(b,n) || is_matrix(b,n),"R and b are not compatible in back_substitute")
!is_vector(b) ? transpose([for(i=[0:len(b[0])-1]) back_substitute(R,subindex(b,i))]) :
!is_vector(b) ? transpose([for(i=[0:len(b[0])-1]) back_substitute(R,subindex(b,i),transpose=transpose)]) :
transpose?
reverse(back_substitute(
[for(i=[0:n-1]) [for(j=[0:n-1]) R[n-1-j][n-1-i]]],