Fixed the initial condition of forward sweep
This commit is contained in:
parent
4919f488d4
commit
31eb457614
@ -17,6 +17,7 @@ Following Thomas algorithm for gaussian elimination, we first perform a forward
|
||||
\State $n \leftarrow$ length of $\vec{b}$
|
||||
\State $\vec{\hat{b}}$, $\vec{\hat{g}} \leftarrow$ vectors of length $n$.
|
||||
\State $\hat{b}_{1} \leftarrow b_{1}$ \Comment{Handle first element in main diagonal outside loop}
|
||||
\State $\hat{g}_{1} \leftarrow g_{1}$
|
||||
\For{$i = 2, 3, ..., n$}
|
||||
\State $d \leftarrow \frac{a_{i}}{\hat{b}_{i-1}}$ \Comment{Calculating common expression}
|
||||
\State $\hat{b}_{i} \leftarrow b_{i} - d \cdot c_{i-1}$
|
||||
|
||||
Loading…
Reference in New Issue
Block a user