Swaps the content of two sparse matrices of the same type. * This is a fast operation that simply swaps the underlying pointers and parameters. */
| 842 | /** Swaps the content of two sparse matrices of the same type. |
| 843 | * This is a fast operation that simply swaps the underlying pointers and parameters. */ |
| 844 | inline void swap(SparseMatrix& other) |
| 845 | { |
| 846 | //EIGEN_DBG_SPARSE(std::cout << "SparseMatrix:: swap\n"); |
| 847 | std::swap(m_outerIndex, other.m_outerIndex); |
| 848 | std::swap(m_innerSize, other.m_innerSize); |
| 849 | std::swap(m_outerSize, other.m_outerSize); |
| 850 | std::swap(m_innerNonZeros, other.m_innerNonZeros); |
| 851 | m_data.swap(other.m_data); |
| 852 | } |
| 853 | |
| 854 | /** Sets *this to the identity matrix. |
| 855 | * This function also turns the matrix into compressed mode, and drop any reserved memory. */ |
no test coverage detected