3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-02 12:13:46 +01:00
dft_tools/doc/reference/c++/arrays/blas_lapack.rst
Olivier Parcollet 3fe400d34c doc : split c++ code from rst
- examples split from the rst file using a python script (split_code).
- Final result for the doc is unchanged.
- examples are compiled and tested with the other tests.
- examples' code have been clang-formatted, with triqs style.
- doc compiles much faster, and with the same options as the rest of the
  test.
- examples are added as tests, so they are run by make test, as simple C
  tests.
- done for the tutorials and the reference.
- autocompile removed (changed into triqs_example directive).
- add triqs_example :
   - make a literal include of the source code.
   - runs the compiled example
   - add, as before, the result to the source code in the doc.
- added the script split_code, used to make the changes automatically,
  maybe for later reuse. (in _tools)
2014-05-31 23:00:16 +02:00

62 lines
1.6 KiB
ReStructuredText

.. highlight:: c
Linear algebra
===============================================
.. warning::
Doc still largely to be written and updated....
Several standard linear algebra operations are provided for the matrix and vector.
Note however that matrix and vector are not the main purpose of this library,
hence the linear algebra support is less extended than other purely matrix library,
like e.g. Eigen.
The computation are done when possible by calling lapack and blas.
In some important cases (like matrix product), a slow but generic version is also
provided for type that lapack do not treat (e.g. matrix of int, matrix of custom objects)
but be aware that these are not optimized for performance and should be used only in
non critical part of the codes.
matrix product
--------------------
The * operator map the matrix x matrix and matrix x vector product.
Example : matrix * matrix and * vector ...
.. triqs_example:: ./blas_lapack_0.cpp
For types that lapack do not use, a generic version of the matrix product is provided.
(same syntax, the dispatch is made at compile time depending of the type of the matrices).
Matrix inversion
----------------------
The inverse function return a lazy inverse of any object which has ImmutableMatrix concept
and can therefore be mixed with any other matrix expression.
Example : TO BE WRITTEN
LU decomposition
----------------------
Done. doc to be written
Diagonalization
-------------------
Done. doc to be written
SVD decomposition
-------------------
To be done
Interface with Eigen
------------------------
To be implemented. Only possible for when order is known at compile time.