Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li>(optional) Understand <a href="http://en.wikipedia.org/wiki/Gaussian_elimination" rel="nofollow noreferrer">this</a>. Do some examples on paper.</li> <li><em>Don't write code for Gaussian elimination yourself</em>. Without some care, the naive gauss pivoting is unstable. You have to scale the lines and take care of pivoting with the greatest element, a starting point is <a href="http://en.wikipedia.org/wiki/Pivot_element" rel="nofollow noreferrer">there</a>. Note that this advice holds for most linear algebra algorithms.</li> <li>If you want to solve systems of equations, <a href="http://en.wikipedia.org/wiki/LU_decomposition" rel="nofollow noreferrer">LU decomposition</a>, <a href="http://en.wikipedia.org/wiki/QR_decomposition" rel="nofollow noreferrer">QR decomposition</a> (stabler than LU, but slower), <a href="http://en.wikipedia.org/wiki/Cholesky_decomposition" rel="nofollow noreferrer">Cholesky decomposition</a> (in the case the system is symmetric) or <a href="http://en.wikipedia.org/wiki/Singular_value_decomposition" rel="nofollow noreferrer">SVD</a> (in the case the system is not square) are almost always better choices. Gaussian elimination is best for computing determinants however.</li> <li>Use the algorithms from <a href="http://www.netlib.org/lapack/" rel="nofollow noreferrer">LAPACK</a> for the problems which need Gaussian elimination (eg. solving systems, or computing determinants). Really. Don't roll your own. Since you are doing C++, you may be interested in <a href="http://arma.sourceforge.net/" rel="nofollow noreferrer">Armadillo</a> which takes care of a lot of things for you.</li> <li>If you must roll your own for pedagogical reasons, have a look first at <em>Numerical Recipes, version 3</em>. Version 2 can be found online for free if you're low on budget / have no access to a library.</li> <li>As a general advice, don't code algorithms you don't understand.</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload