Logo Search packages:      
Sourcecode: eigen3 version File versions  Download package

template<typename _Scalar, int _Options, typename _Index>
EIGEN_DEPRECATED Scalar& SparseMatrix< _Scalar, _Options, _Index >::fill ( Index  row,
Index  col 
) [inline]
Deprecated:
use insert()

Definition at line 575 of file SparseMatrix.h.

    {
      const Index outer = IsRowMajor ? row : col;
      const Index inner = IsRowMajor ? col : row;

      if (m_outerIndex[outer+1]==0)
      {
        // we start a new inner vector
        Index i = outer;
        while (i>=0 && m_outerIndex[i]==0)
        {
          m_outerIndex[i] = m_data.size();
          --i;
        }
        m_outerIndex[outer+1] = m_outerIndex[outer];
      }
      else
      {
        eigen_assert(m_data.index(m_data.size()-1)<inner && "wrong sorted insertion");
      }
//       std::cerr << size_t(m_outerIndex[outer+1]) << " == " << m_data.size() << "\n";
      assert(size_t(m_outerIndex[outer+1]) == m_data.size());
      Index p = m_outerIndex[outer+1];
      ++m_outerIndex[outer+1];

      m_data.append(0, inner);
      return m_data.value(p);
    }

Generated by  Doxygen 1.6.0   Back to index