title: Sparse matrix CRS logic for IA array
body: <p>I tried realise <code>Sparse matrix</code>  storage format. Wikipedia say: <a href="https://en.wikipedia.org/wiki/Sparse_matrix" rel="nofollow noreferrer">this</a></p>
  
  <p>I need <code>CRS</code> algoritm. But I can not understand the algorithm to the end. I have matrix like in example in link</p>
  
  <pre><code>0 0 0 0
  5 8 0 0
  0 0 3 0 
  0 6 0 0
  </code></pre>
  
  <p>and 3 arrays</p>
  
  <pre><code>   A  = [ 5 8 3 6 ]
     IA = [ 0 0 2 3 4 ]
     JA = [ 0 1 2 1 ]
  </code></pre>
  
  <p>Ok I understand, what A - all not zero elements
                        JA - column index of first not zero element in row
                        But by what logic is IA???</p>