\returns the value of the matrix at position \a i, \a j * This function returns Scalar(0) if the element is an explicit \em zero */
| 181 | /** \returns the value of the matrix at position \a i, \a j |
| 182 | * This function returns Scalar(0) if the element is an explicit \em zero */ |
| 183 | inline Scalar coeff(Index row, Index col) const |
| 184 | { |
| 185 | eigen_assert(row>=0 && row<rows() && col>=0 && col<cols()); |
| 186 | |
| 187 | const Index outer = IsRowMajor ? row : col; |
| 188 | const Index inner = IsRowMajor ? col : row; |
| 189 | Index end = m_innerNonZeros ? m_outerIndex[outer] + m_innerNonZeros[outer] : m_outerIndex[outer+1]; |
| 190 | return m_data.atInRange(m_outerIndex[outer], end, StorageIndex(inner)); |
| 191 | } |
| 192 | |
| 193 | /** \returns a non-const reference to the value of the matrix at position \a i, \a j |
| 194 | * |
no test coverage detected