@@ -324,7 +324,7 @@ In code, this process might look like this:
324324{% sample lang="py" %}
325325[ import:13-19, lang:"python"] ( code/python/gaussian_elimination.py )
326326{% sample lang="rs" %}
327- [ import:43-60 , lang:"rust"] ( code/rust/gaussian_elimination.rs )
327+ [ import:43-76 , lang:"rust"] ( code/rust/gaussian_elimination.rs )
328328{% endmethod %}
329329
330330As a note, if the highest value is $$ 0 $$ , the matrix is singular and the system has no single solution.
@@ -396,7 +396,7 @@ Here is what it might look like in code:
396396{% sample lang="py" %}
397397[ import:21-26, lang:"python"] ( code/python/gaussian_elimination.py )
398398{% sample lang="rs" %}
399- [ import:62-71 , lang:"rust"] ( code/rust/gaussian_elimination.rs )
399+ [ import:62-75 , lang:"rust"] ( code/rust/gaussian_elimination.rs )
400400{% endmethod %}
401401
402402#### All together
@@ -409,8 +409,6 @@ When we put everything together, it looks like this:
409409[ import:15-48, lang:"c"] ( code/c/gaussian_elimination.c )
410410{% sample lang="cpp" %}
411411[ import:8-34, lang:"cpp"] ( code/c++/gaussian_elimination.cpp )
412- {% sample lang="rs" %}
413- [ import:41-78, lang:"rust"] ( code/rust/gaussian_elimination.rs )
414412{% sample lang="hs" %}
415413[ import:10-36, lang:"haskell"] ( code/haskell/gaussianElimination.hs )
416414{% sample lang="py" %}
@@ -421,6 +419,8 @@ When we put everything together, it looks like this:
421419[ import:1-38, lang:"javascript"] ( code/javascript/gaussian_elimination.js )
422420{% sample lang="go" %}
423421[ import:9-53, lang:"go"] ( code/go/gaussian_elimination.go )
422+ {% sample lang="rs" %}
423+ [ import:41-77, lang:"rust"] ( code/rust/gaussian_elimination.rs )
424424{% endmethod %}
425425
426426To be clear: if the matrix is found to be singular during this process, the system of equations is either over- or under-determined and no general solution exists.
@@ -450,9 +450,6 @@ Here it is in code:
450450[ import:64-82, lang:"c"] ( code/c/gaussian_elimination.c )
451451{% sample lang="cpp" %}
452452[ import:36-54, lang:"cpp"] ( code/c++/gaussian_elimination.cpp )
453- {% sample lang="rs" %}
454- This code does not exist yet in rust, so here's Julia code (sorry for the inconvenience)
455- [ import:67-93, lang:"julia"] ( code/julia/gaussian_elimination.jl )
456453{% sample lang="hs" %}
457454[ import:38-46, lang:"haskell"] ( code/haskell/gaussianElimination.hs )
458455{% sample lang="py" %}
@@ -463,6 +460,8 @@ This code does not exist yet in rust, so here's Julia code (sorry for the inconv
463460[ import:57-76, lang:"javascript"] ( code/javascript/gaussian_elimination.js )
464461{% sample lang="go" %}
465462[ import:55-82, lang:"go"] ( code/go/gaussian_elimination.go )
463+ {% sample lang="rs" %}
464+ [ import:79-96, lang:"rust"] ( code/rust/gaussian_elimination.rs )
466465{% endmethod %}
467466
468467As a note: Gauss-Jordan elimination can also be used to find the inverse of a matrix by following the same procedure to generate a reduced row echelon matrix, but with an identity matrix on the other side instead of the right-hand side of each equation.
@@ -496,7 +495,7 @@ In code, it looks like this:
496495{% sample lang="cpp" %}
497496[ import:56-72, lang:"cpp"] ( code/c++/gaussian_elimination.cpp )
498497{% sample lang="rs" %}
499- [ import:79-94 , lang:"rust"] ( code/rust/gaussian_elimination.rs )
498+ [ import:98-112 , lang:"rust"] ( code/rust/gaussian_elimination.rs )
500499{% sample lang="hs" %}
501500[ import:48-53, lang:"haskell"] ( code/haskell/gaussianElimination.hs )
502501{% sample lang="py" %}
@@ -523,7 +522,7 @@ That said, it is particularly interesting to see what happens as we plot our mat
523522<video width =" 560 " height =" 315 " autoplay controls loop >
524523 <source src =" res/GE_vis.mp4 " type =" video/mp4 " >
525524Your browser does not support the video tag.
526- </video >
525+ </video >
527526</div >
528527
529528As we can see in the above visualization, the planes wobble about in 3D until they reach row echelon form, where one plane is parallel to the $$ x $$ and $$ y $$ axes.
0 commit comments