mirror of
https://github.com/triqs/dft_tools
synced 2024-12-26 06:14:14 +01:00
doc: det_manip, link towards the cookbook added, explanations added
This commit is contained in:
parent
a39e41e9fd
commit
196e3f9663
@ -18,4 +18,3 @@ C++
|
|||||||
det_manip/contents
|
det_manip/contents
|
||||||
parameters/parameters
|
parameters/parameters
|
||||||
utilities/contents
|
utilities/contents
|
||||||
|
|
||||||
|
55
doc/reference/c++/det_manip/behind.rst
Normal file
55
doc/reference/c++/det_manip/behind.rst
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
.. highlight:: c
|
||||||
|
|
||||||
|
How does it work ?
|
||||||
|
###################
|
||||||
|
|
||||||
|
Cofactors
|
||||||
|
==========
|
||||||
|
|
||||||
|
For any :math:`n\times n` matrix :math:`A`:
|
||||||
|
|
||||||
|
.. math:: A\,{\rm Cof}(A^T) = {\rm Det}A\, I_n.
|
||||||
|
|
||||||
|
where :math:`\rm{Cof}` means the matrix of the cofactors.
|
||||||
|
|
||||||
|
.. math:: {\rm Cof}(A)_{i,j}
|
||||||
|
=(-1)^{i+j}{\rm Det}\begin{pmatrix}
|
||||||
|
a_{1,1} & \dots & a_{1,j-1} & a_{1,j+1} & \dots & a_{1,n} \\
|
||||||
|
\vdots & & \vdots & \vdots & & \vdots \\
|
||||||
|
a_{i-1,1} & \dots & a_{i-1,j-1} & a_{i-1,j+1}& \dots & a_{i-1,n} \\
|
||||||
|
a_{i+1,1} & \dots & a_{i+1,j-1} & a_{i+1,j+1}& \dots & a_{i+1,n} \\
|
||||||
|
\vdots & & \vdots & \vdots & & \vdots \\
|
||||||
|
a_{n,1} & \dots & a_{n,j-1} & a_{n,j+1} & \dots & a_{n,n} \end{pmatrix}.
|
||||||
|
|
||||||
|
|
||||||
|
Change in the determinant when one adds a line and a column
|
||||||
|
============================================================
|
||||||
|
|
||||||
|
:math:`A` is an inversible :math:`n\times n` matrix. :math:`A'` is a :math:`(n+1)\times (n+1)` matrix obtained by adding a line and a column to :math:`A`:
|
||||||
|
|
||||||
|
.. math:: A'=\begin{pmatrix}
|
||||||
|
A & B \\
|
||||||
|
C & D \end{pmatrix}.
|
||||||
|
|
||||||
|
Using the previous formula with the cofactors, we get
|
||||||
|
|
||||||
|
.. math:: \frac{{\rm Det}A'}{{\rm Det}A}=C A^{-1} B+D.
|
||||||
|
|
||||||
|
|
||||||
|
Change in the inverse when one adds a line and a column
|
||||||
|
==========================================================
|
||||||
|
|
||||||
|
Using the following variables:
|
||||||
|
|
||||||
|
.. math:: \xi=D-C A^{-1} B, \qquad B'=A^{-1}B, \qquad C'=CA^{-1},
|
||||||
|
|
||||||
|
We get the inverse of the new matrix as:
|
||||||
|
|
||||||
|
.. math:: (A')^{-1}=
|
||||||
|
\begin{pmatrix}
|
||||||
|
A^{-1}+\xi B'C' & -\xi B'\\
|
||||||
|
-\xi C' & \xi
|
||||||
|
\end{pmatrix}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
.. highlight:: c
|
.. _det_manip:
|
||||||
|
|
||||||
Manipulations of determinants
|
Manipulations of determinants
|
||||||
=============================
|
=============================
|
||||||
@ -7,11 +7,10 @@ Manipulations of determinants
|
|||||||
|
|
||||||
This library is stable, but documentation is still a bit spartan ...
|
This library is stable, but documentation is still a bit spartan ...
|
||||||
|
|
||||||
The purpose of this little class is to regroup standard block manipulations on determinant, used in several
|
The purpose of this little class is to regroup standard block manipulations on determinant, used in several algorithms.
|
||||||
QMC.
|
|
||||||
|
|
||||||
Given a function :math:`F(x,y)`, and two sets of values :math:`x_i,y_i \ 0\leq i < N`,
|
Given a function :math:`F(x,y)`, and two sets of values :math:`x_i,y_i \ 0\leq i < N`,
|
||||||
we can define the square :math:`N\times N` matrix
|
we can define the :math:`N\times N` square matrix
|
||||||
|
|
||||||
.. math::
|
.. math::
|
||||||
|
|
||||||
@ -21,7 +20,7 @@ When adding/removing a line and column (i.e. a value of x, y),
|
|||||||
:math:`M^{-1}` and :math:`det M` can be fast updated using standard block matrix computations.
|
:math:`M^{-1}` and :math:`det M` can be fast updated using standard block matrix computations.
|
||||||
This class implements these general operations. It contains :
|
This class implements these general operations. It contains :
|
||||||
|
|
||||||
* Data :
|
* Datas :
|
||||||
|
|
||||||
* :math:`M^{-1}` and :math:`det M`
|
* :math:`M^{-1}` and :math:`det M`
|
||||||
* a vector containing :math:`x_i,y_i \ 0\leq i \leq N`
|
* a vector containing :math:`x_i,y_i \ 0\leq i \leq N`
|
||||||
@ -38,4 +37,5 @@ This class implements these general operations. It contains :
|
|||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
det_manip
|
det_manip
|
||||||
cookbook
|
behind
|
||||||
|
cookbook/contents
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
Cookbook
|
|
||||||
========
|
|
||||||
|
|
||||||
Basics
|
Basics
|
||||||
------
|
------
|
||||||
|
|
||||||
@ -66,5 +63,6 @@ Here, an exemple of creation of a class det_manip, of use of insert and remove.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Learn more in the full reference, see :ref:`det_manip`
|
||||||
|
|
||||||
|
|
9
doc/reference/c++/det_manip/cookbook/contents.rst
Normal file
9
doc/reference/c++/det_manip/cookbook/contents.rst
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
.. highlight:: c
|
||||||
|
|
||||||
|
Det_manip cookbook
|
||||||
|
===================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
basic
|
Loading…
Reference in New Issue
Block a user