3
0
mirror of https://github.com/triqs/dft_tools synced 2024-10-31 11:13:46 +01:00

Working on doc for det_manip

Work on det_manip doc
This commit is contained in:
tayral 2014-03-12 10:42:30 +00:00 committed by Olivier Parcollet
parent 558df98786
commit d85cf0b4d2

View File

@ -12,8 +12,80 @@ which is completely general but has to model the concept
* return_type : type returned by the function
* argument_type : type of the argument of the function (type of x and y).
Operations
----------
Public types
-------------
+------------------+-----------------------------+
| name | description |
+==================+=============================+
| xy_type | ? |
+------------------+-----------------------------+
| value_type | ? |
+------------------+-----------------------------+
| vector_type | tqa::vector<value_type> |
+------------------+-----------------------------+
| matrix_type | tqa::matrix<value_type> |
+------------------+-----------------------------+
| matrix_view_type | tqa::matrix_view<value_type |
+------------------+-----------------------------+
Public member functions
-----------------------
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| return type | member function | description |
+===============================================+======================================================================================================================================+============================================================================================================================================================================+
| | det_manip(FunctionType F, size_t init_size) | constructor |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | det_manip(FunctionType F, ArgumentContainer1 const &X, ArgumentContainer2 const &Y) | constructor |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | det_manip(det_manip const &) | constructor |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | det_manip(det_manip &&rhs) noexcept | constructor |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| det_manip & | operator=(const det_manip &) | |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| det_manip & | operator=(det_manip && rhs) no except | ? |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | clear() | put to size 0 (like a vector) |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| size_t | size() const | current size of the matrix |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| xy_type const & | get_x(size_t i) const | returns the i-th values of x |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| xy_type const & | get_y(size_t j) const | returns the j-th values of y |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| value_type | determinant() const | determinant |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| value_type | inverse_matrix(size_t i, size_t j) const | ? |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| matrix_view_type | inverse_matrix() const | Returns the inverse matrix. Warning : this is slow, since it create a new copy, and reorder the lines/cols. |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| matrix_view_type | matrix() const | Rebuild the matrix. Warning : this is slow, since it create a new matrix and re-evaluate the function. |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| value_type | try_insert(size_t i, size_t j, xy_type const &x, xy_type const &y) | returns determinant ratio corresponding to the insertion of an element x-y on line i, column j without actually doing it. In particular, does not change determinant size. |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| template<typename Fx, typename Fy> value_type | try_insert_from_function (size_t i, size_t j, Fx fx, Fy fy, value_type const ksi) | ? |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| value_type | try_insert2 (size_t i0, size_t i1, size_t j0, size_t j1, xy_type const &x0, xy_type const &x1, xy_type const &y0, xy_type const &y1) | ? |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| value_type | try_remove (size_t i, size_t j) | ? |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| value_type | try_remove2 (size_t i0, size_t i1, size_t j0, size_t j1) | ? |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| value_type | try_change_col (size_t j, xy_type const &y) | ? |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| value_type | try_change_row (size_t i, xy_type const &x) | ? |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | complete_operation() | ? |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| int | roll_matrix (RollDirection roll) | ? |
+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Synopsis
-----------
* The possible operations on the matrix M are :
@ -109,8 +181,11 @@ Example
/// insertions of 3 lines and 3 columns
double x=2., y=9., detratio;
std::cout << D.size() << std::endl;
detratio = D.try_insert(0, 0, x, y );
std::cout << D.size() << std::endl;
D.complete_operation();
std::cout << D.size() << std::endl;
detratio = D.try_insert(0, 1, 2., 3.);
D.complete_operation();
detratio = D.try_insert(0, 0, 4., 5.);