mirror of
https://github.com/triqs/dft_tools
synced 2024-12-26 06:14:14 +01:00
doc: cookbooks from det_manip and arrays harmonized
This commit is contained in:
parent
dbe2224caf
commit
67a1a7c079
@ -10,7 +10,6 @@ Multidimensional arrays
|
|||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
:numbered:
|
|
||||||
|
|
||||||
introduction
|
introduction
|
||||||
concepts
|
concepts
|
||||||
@ -35,4 +34,4 @@ Multidimensional arrays
|
|||||||
multithreading
|
multithreading
|
||||||
FAQ
|
FAQ
|
||||||
implementation_notes/contents
|
implementation_notes/contents
|
||||||
|
./../../../tutorials/c++/array_tutorial
|
||||||
|
@ -39,4 +39,4 @@ This class implements these general operations. It contains :
|
|||||||
|
|
||||||
det_manip
|
det_manip
|
||||||
behind
|
behind
|
||||||
cookbook/contents
|
./../../../tutorials/c++/det_manip_tutorial
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
.. highlight:: c
|
|
||||||
|
|
||||||
Det_manip cookbook
|
|
||||||
===================
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 2
|
|
||||||
|
|
||||||
basic
|
|
@ -1,9 +1,14 @@
|
|||||||
Using arrays
|
Examples of use of arrays
|
||||||
===============
|
==========================
|
||||||
|
|
||||||
.. highlight:: c
|
.. highlight:: c
|
||||||
|
|
||||||
TRIQS comes with a library of multidimensional arrays. This library, among others, allows for easy slicing, archiving and algebraic manipulations of multidimensional arrays. Here are a couple of simple examples showing the basic use of this class.
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
TRIQS comes with a library of multidimensional arrays.
|
||||||
|
This library, among others, allows for easy slicing, archiving and algebraic manipulations of multidimensional arrays.
|
||||||
|
Here are a couple of simple examples showing the basic use of this class.
|
||||||
|
|
||||||
|
|
||||||
Declaring and printing an array
|
Declaring and printing an array
|
||||||
@ -173,4 +178,4 @@ Map and fold
|
|||||||
std::cout << "F(2*A) = "<<C<<std::endl;
|
std::cout << "F(2*A) = "<<C<<std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
The full reference of the array library can be found :doc:`here: <../../reference/c++/arrays/contents>`
|
The full reference of the array library can be found :doc:`here <../../reference/c++/arrays/contents>`
|
||||||
|
@ -9,6 +9,6 @@ C++ libraries
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
array_tutorial
|
array_tutorial
|
||||||
|
det_manip_tutorial
|
||||||
|
|
||||||
..
|
..
|
||||||
|
@ -1,3 +1,18 @@
|
|||||||
|
Det_manip cookbook
|
||||||
|
===================
|
||||||
|
|
||||||
|
.. highlight:: c
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
TRIQS comes with a class called det_manip to easily perform operations on a special type of matrices
|
||||||
|
(see :doc:`here <../../reference/c++/det_manip/contents>`).
|
||||||
|
This library, among others, allows to easily add or remove lines or columns to the matrix, to calculate the determinant and the inverse.
|
||||||
|
Here are a couple of simple examples showing the basic use of this class.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Creation of an empty det_manip class
|
Creation of an empty det_manip class
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
@ -108,7 +123,7 @@ Add a line and a column
|
|||||||
double x0 = 2.1, y0 = 7;
|
double x0 = 2.1, y0 = 7;
|
||||||
int i = 2, j = 0; // number of the added line and column
|
int i = 2, j = 0; // number of the added line and column
|
||||||
std::cout<<"We want to add a line and a column for i="<<i<<", j="<<j
|
std::cout<<"We want to add a line and a column for i="<<i<<", j="<<j
|
||||||
<<", x="<<x0<<", y="<<y0<<" (f(x,y)="<<f(x0,y0)<<")."<<std::endl;
|
<<", x="<<x0<<", y="<<y0<<"."<<std::endl;
|
||||||
// (try of) insertion of a line and a column at position (3,1) in the matrix
|
// (try of) insertion of a line and a column at position (3,1) in the matrix
|
||||||
// with x[i]=x0, y[j]=y0.
|
// with x[i]=x0, y[j]=y0.
|
||||||
double detratio = D.try_insert(i, j, x0, y0); // the ratio between new and old determinants
|
double detratio = D.try_insert(i, j, x0, y0); // the ratio between new and old determinants
|
Loading…
Reference in New Issue
Block a user