################# Matrix Operations ################# It is possible to perform simple linear algebra routines: .. code-block:: cpp /* Definition of the Matrix type */ using Matrix = danceq::internal::SparseMatrix<std::complex<double>>; /* Creating and doing something with the Matrix */ Matrix A, B; ... Matrix C = A * B; Matrix D = A - B; Matrix E = A.tensor_product(B); /* transpose of A */ Matrix F = A.T(); /* G = 42 * A */ Matrix G = A.scale(42.); .. note:: We recommend to use `LAPACK <https://de.wikipedia.org/wiki/LAPACK>`_ libaries like `MKL <https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html>`_ or :ref:`Petsc<Petsc_setup>`. The functions do **not** support `OpenMP <https://www.openmp.org/>`_. .. doxygenfunction:: danceq::internal::SparseMatrix::operator*(const SparseMatrix<ScalarType>& other) const .. doxygenfunction:: danceq::internal::SparseMatrix::operator+(const SparseMatrix<ScalarType>& other) const .. doxygenfunction:: danceq::internal::SparseMatrix::operator-(const SparseMatrix<ScalarType>& other) const .. doxygenfunction:: danceq::internal::SparseMatrix::operator=(const SparseMatrix<ScalarType>& other) .. doxygenfunction:: danceq::internal::SparseMatrix::tensor_product(const SparseMatrix<ScalarType>& other) const .. doxygenfunction:: danceq::internal::SparseMatrix::T(void) const .. doxygenfunction:: danceq::internal::SparseMatrix::scale(ScalarType factor)