title: representing matrix by linkedlist
body: <p>The problem is:</p>
  
  <blockquote>
    <p>An alternative linked representation for sparse matrices uses nodes that have the fields down, right,
        roe, col, and value. Each nonzero entry of the sparse matrix is represented
        by a node. The zero terms are not explicitly stored. The nodes are linked
        together to form two circular lists. The first list, the row list, is made
        up by linking nodes by rows and within rows by columns using the right
        eld. The second,list, the column list, is made up by linking nodes via the
        down field. In this list, nodes are linked by columns and within columns
        by rows. These two lists share a common header node. In addition, a
        node is added to the dimensions of the matrix.</p>
  </blockquote>
  
  <p>I hope to overload operator >> and also add and transpose methods:</p>
  
  <pre><code> istream &amp; operator&gt;&gt;(istream &amp; in, sparseMatrixLinked&lt;T&gt; x); 
  //The input format is as follows. 
  
  4   4   3  //   # of rows, # of cols, # of nonzero entries
  0   0   2  // row #, col #, item value #
  0   3   1
  1   1   7
  
  void sparseMatrixLinked&lt;T&gt;::add(sparseMatrixLinked&lt;T&gt; &amp;b,sparseMatrixLinked&lt;T&gt; &amp;c);
          // c = (*this) + b 
  
  
  void sparseMatrixLinked&lt;T&gt;::transpose(sparseMatrixLinked&lt;T&gt; &amp;b) ;
  // b is transpose of *this.
  </code></pre>
  
  <p>I cannot figure out a solution. Could anyone provide some advice? Thank you very much!</p>