Skip to content

Instantly share code, notes, and snippets.

@kinoh
Created July 18, 2014 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kinoh/8f613b50b516da98f270 to your computer and use it in GitHub Desktop.
Save kinoh/8f613b50b516da98f270 to your computer and use it in GitHub Desktop.
Gauß Elimination
A: {1..m} * {1..n} -> Field
for i in {1..m-1}
k = max(k => abs(A[k,i]), {i..m})
A = swap(A, i, k)
for j in {i+1..m}
A[j] -= (A[j,1] / A[i,1]) * A[i]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment