Swaps the content of two sparse matrices of the same type. * This is a fast operation that simply swaps the underlying pointers and parameters. */
| 730 | /** Swaps the content of two sparse matrices of the same type. |
| 731 | * This is a fast operation that simply swaps the underlying pointers and parameters. */ |
| 732 | inline void swap(SparseMatrix& other) |
| 733 | { |
| 734 | //EIGEN_DBG_SPARSE(std::cout << "SparseMatrix:: swap\n"); |
| 735 | std::swap(m_outerIndex, other.m_outerIndex); |
| 736 | std::swap(m_innerSize, other.m_innerSize); |
| 737 | std::swap(m_outerSize, other.m_outerSize); |
| 738 | std::swap(m_innerNonZeros, other.m_innerNonZeros); |
| 739 | m_data.swap(other.m_data); |
| 740 | } |
| 741 | |
| 742 | /** Sets *this to the identity matrix. |
| 743 | * This function also turns the matrix into compressed mode, and drop any reserved memory. */ |
no test coverage detected