mirror of
https://github.com/triqs/dft_tools
synced 2025-01-12 05:58:18 +01:00
Work on doc. Added notations & C++ intro
This commit is contained in:
parent
4413c6a588
commit
fe58c9759f
@ -107,7 +107,7 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/themes/triqs DESTINATION share/tri
|
|||||||
|
|
||||||
# PDF documentation
|
# PDF documentation
|
||||||
if (Build_PDF_Documentation)
|
if (Build_PDF_Documentation)
|
||||||
add_dependencies(docs_sphinx_pdf_cpp triqs )
|
add_dependencies(docs_sphinx_pdf triqs )
|
||||||
install(FILES ${sphinx_top_pdf} DESTINATION share/doc/triqs/)
|
install(FILES ${sphinx_top_pdf} DESTINATION share/doc/triqs/)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -9,12 +9,13 @@ C++
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
|
conventions
|
||||||
using_the_lib/contents
|
using_the_lib/contents
|
||||||
arrays/contents
|
arrays/contents
|
||||||
gf/contents
|
gf/contents
|
||||||
clef/contents
|
clef/contents
|
||||||
mctools/intro
|
mctools/intro
|
||||||
det_manip/det_manip
|
det_manip/contents
|
||||||
parameters/parameters
|
parameters/parameters
|
||||||
utilities/contents
|
utilities/contents
|
||||||
|
|
||||||
|
43
doc/reference/c++/conventions.rst
Normal file
43
doc/reference/c++/conventions.rst
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
C++11/14 & notations
|
||||||
|
=====================
|
||||||
|
|
||||||
|
C++11/C++14
|
||||||
|
---------------
|
||||||
|
|
||||||
|
TRIQS is a C++11 library. It *requires* a last generation C++ compiler (Cf :ref:`require_cxx_compilers`).
|
||||||
|
|
||||||
|
Indeed, the development of C++ is very dynamic these years.
|
||||||
|
The language and its usage is changing very profoundly with the introduction of several
|
||||||
|
notions (e.g. move semantics, type deduction, lambda, variadic templates ...).
|
||||||
|
Moreover, C++11 compliant compilers are now widely available, with gcc and clang.
|
||||||
|
|
||||||
|
A major consequence of this evolution is that writing libraries
|
||||||
|
has become much more accessible, at a *much* lower cost in development time,
|
||||||
|
with clearer, shorter and more readable code, hence maintainable.
|
||||||
|
Efficient techniques which were considered before as complex and reserved to professional C++ experts
|
||||||
|
are now becoming simple to implement, like e.g. expression templates.
|
||||||
|
|
||||||
|
The implementation of most of the TRIQS library (e.g. clef, arrays) would be either impossible or at least
|
||||||
|
much more complex and time consuming (with a lot of abstruse boost-like construction)
|
||||||
|
in previous versions of C++.
|
||||||
|
|
||||||
|
Besides, this evolution is not finished.
|
||||||
|
The new coming standard, C++14, expected to be adopted and implemented very soon,
|
||||||
|
will still make it a lot better. In particular, the concept support (template constraints)
|
||||||
|
will hopefully solve the most problematic issue with metaprogramming techniques, i.e. the lack of concept
|
||||||
|
check at compile time, resulting in long and obscur error messages from the compiler when *using* the library.
|
||||||
|
Hence, TRIQS will move to C++14 as soon as compilers are available.
|
||||||
|
|
||||||
|
Notation
|
||||||
|
----------
|
||||||
|
|
||||||
|
In the documentation, we make use in particular of the C++14 concept notation for template.
|
||||||
|
For example ::
|
||||||
|
|
||||||
|
template<ImmutableArray A> void f(A const & a);
|
||||||
|
|
||||||
|
means that f is a template ::
|
||||||
|
|
||||||
|
template<typename A> void f(A const & a);
|
||||||
|
|
||||||
|
which is enabled or valid only for types A which models the `ImmutableArray` concept.
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Manipulations of determinants
|
Manipulations of determinants
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
This library is stable, but documentation is still a bit spartan ...
|
This library is stable, but documentation is still a bit spartan ...
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
.. _montecarlo:
|
.. _montecarlo:
|
||||||
|
|
||||||
The Monte Carlo class
|
Tools for Monte Carlo
|
||||||
=====================
|
=========================
|
||||||
|
|
||||||
The TRIQS library has a class called ``mc_generic`` which allows you to write
|
The TRIQS library provide simple tools for Monte Carlo codes, like a class called ``mc_generic`` which allows you to write
|
||||||
Monte Carlo algorithms in a simple framework. The class takes care of the basic
|
Monte Carlo algorithms in a simple framework. The class takes care of the basic
|
||||||
mechanics which is common to any Monte Carlo method so that you can focus on
|
mechanics which is common to any Monte Carlo method so that you can focus on
|
||||||
the implementation details of your specific algorithm.
|
the implementation details of your specific algorithm.
|
||||||
|
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user