From edd1ff45292cea35c48f1129c3085e813b73f04c Mon Sep 17 00:00:00 2001 From: tayral Date: Fri, 17 Oct 2014 17:15:19 +0100 Subject: [PATCH] Restructuring documentation. A first general restructuration of the doc according to the pattern [tour|tutorial|reference]. In the reference part, objects are documented per topic. In each topic, [definition|c++|python|hdf5] (not yet implemented) --- doc/CMakeLists.txt | 5 +- doc/conf.py.in | 4 +- doc/documentation.rst | 58 ++++++- doc/reference/{c++ => }/CMakeLists.txt | 3 - doc/reference/{c++ => }/arrays/CMakeLists.txt | 0 doc/reference/{c++ => }/arrays/FAQ.rst | 2 +- doc/reference/{c++ => }/arrays/H5.rst | 0 doc/reference/{c++ => }/arrays/IO.rst | 0 doc/reference/{c++ => }/arrays/IO_0.cpp | 0 .../{c++ => }/arrays/Interop_Python.rst | 0 doc/reference/{c++ => }/arrays/algebras.rst | 12 +- doc/reference/{c++ => }/arrays/algebras_0.cpp | 0 doc/reference/{c++ => }/arrays/algebras_1.cpp | 0 .../{c++ => }/arrays/blas_lapack.rst | 4 +- .../{c++ => }/arrays/blas_lapack_0.cpp | 0 doc/reference/{c++ => }/arrays/concepts.rst | 34 ++--- doc/reference/{c++ => }/arrays/concepts_0.cpp | 0 .../arrays/containers/CMakeLists.txt | 0 .../{c++ => }/arrays/containers/STL.rst | 6 +- .../{c++ => }/arrays/containers/STL_0.cpp | 0 .../{c++ => }/arrays/containers/call.rst | 12 +- .../{c++ => }/arrays/containers/call_0.cpp | 0 .../{c++ => }/arrays/containers/call_1.cpp | 0 .../{c++ => }/arrays/containers/call_2.cpp | 0 .../arrays/containers/compound_ops.rst | 2 +- .../{c++ => }/arrays/containers/memory.rst | 0 .../{c++ => }/arrays/containers/range_ell.rst | 12 +- .../arrays/containers/range_ell_0.cpp | 0 .../arrays/containers/range_ell_1.cpp | 0 .../{c++ => }/arrays/containers/rebind.rst | 2 +- .../arrays/containers/reg_assign.rst | 4 +- .../arrays/containers/reg_constructors.rst | 0 .../arrays/containers/reg_constructors_0.cpp | 0 .../{c++ => }/arrays/containers/regular.rst | 10 +- .../{c++ => }/arrays/containers/resize.rst | 6 +- .../{c++ => }/arrays/containers/resize_0.cpp | 0 .../{c++ => }/arrays/containers/resize_1.cpp | 0 .../{c++ => }/arrays/containers/stream.rst | 0 .../{c++ => }/arrays/containers/swap.rst | 2 +- .../{c++ => }/arrays/containers/swap_0.cpp | 0 .../{c++ => }/arrays/containers/swap_1.cpp | 0 .../arrays/containers/template_parameters.rst | 8 +- .../arrays/containers/view_assign.rst | 14 +- .../arrays/containers/view_constructors.rst | 0 .../{c++ => }/arrays/containers/views.rst | 2 +- doc/reference/{c++ => }/arrays/contents.rst | 0 doc/reference/{c++ => }/arrays/debug.rst | 2 +- doc/reference/{c++ => }/arrays/debug_0.cpp | 0 .../{c++ => }/arrays/examples_h5/h5_rw.cpp | 0 .../{c++ => }/arrays/examples_h5/h5_rw.output | 0 .../arrays/examples_h5/h5_stack_ex.cpp | 0 .../arrays/examples_h5/h5_stack_ex.output | 0 .../arrays/examples_h5/h5_stack_ex_sca.cpp | 0 .../arrays/examples_h5/h5_stack_ex_sca.output | 0 doc/reference/{c++ => }/arrays/foreach.rst | 6 +- doc/reference/{c++ => }/arrays/foreach_0.cpp | 0 doc/reference/{c++ => }/arrays/foreach_1.cpp | 0 .../{c++ => }/arrays/group_indices.rst | 2 +- doc/reference/{c++ => }/arrays/h5_complex.rst | 0 doc/reference/{c++ => }/arrays/h5_proxy.rst | 4 +- doc/reference/{c++ => }/arrays/h5_rw.rst | 4 +- doc/reference/{c++ => }/arrays/h5_rw_0.cpp | 0 doc/reference/{c++ => }/arrays/h5_stack.rst | 6 +- .../implementation_notes/assignment.rst | 0 .../arrays/implementation_notes/concepts.rst | 54 +++---- .../arrays/implementation_notes/contents.rst | 0 .../implementation_notes/cuboid_formula.rst | 16 +- .../expression_template.rst | 0 .../implementation_notes/functional.rst | 2 +- .../arrays/implementation_notes/hdf5.rst | 0 .../arrays/implementation_notes/indexmaps.rst | 2 +- .../arrays/implementation_notes/isp.rst | 2 +- .../arrays/implementation_notes/linalg.rst | 0 .../arrays/implementation_notes/python.rst | 6 +- .../implementation_notes/reinterpretation.rst | 0 .../arrays/implementation_notes/slicing.rst | 20 +-- .../arrays/implementation_notes/storage.rst | 2 +- .../arrays/implementation_notes/strategy.rst | 24 +-- .../implementation_notes/userclasses.rst | 2 +- .../{c++ => }/arrays/introduction.rst | 8 +- doc/reference/{c++ => }/arrays/lazy.rst | 6 +- doc/reference/{c++ => }/arrays/lazy_0.cpp | 0 doc/reference/{c++ => }/arrays/map.rst | 16 +- doc/reference/{c++ => }/arrays/map_0.cpp | 0 doc/reference/{c++ => }/arrays/map_1.cpp | 0 .../{c++ => }/arrays/multithreading.rst | 0 .../{c++ => }/arrays/play_with_concept.rst | 10 +- .../{c++ => }/arrays/play_with_concept_0.cpp | 0 doc/reference/{c++ => }/arrays/shape.rst | 0 doc/reference/{c++ => }/arrays/shape_0.cpp | 0 doc/reference/{c++ => }/arrays/simple_fnt.rst | 0 .../{c++ => }/arrays/simple_fnt_0.cpp | 0 .../{c++ => }/arrays/view_or_not_view.rst | 4 +- doc/reference/c++/contents.rst | 22 --- doc/reference/c++/parameters/CMakeLists.txt | 5 - doc/reference/c++/parameters/parameters.rst | 141 ------------------ doc/reference/c++/parameters/parameters_0.cpp | 28 ---- doc/reference/c++/parameters/parameters_1.cpp | 19 --- doc/reference/{c++ => }/clef/CMakeLists.txt | 0 doc/reference/{c++ => }/clef/assign.rst | 4 +- doc/reference/{c++ => }/clef/assign_0.cpp | 0 doc/reference/{c++ => }/clef/assign_1.cpp | 0 doc/reference/{c++ => }/clef/contents.rst | 4 +- .../{c++ => }/clef/examples/contents.rst | 0 .../{c++ => }/clef/examples/lazy_sum.rst | 0 doc/reference/{c++ => }/clef/examples/src | 0 .../{c++ => }/clef/expressions_eval.rst | 6 +- .../{c++ => }/clef/expressions_eval_0.cpp | 0 .../{c++ => }/clef/expressions_form.rst | 22 +-- .../{c++ => }/clef/expressions_form_0.cpp | 0 doc/reference/{c++ => }/clef/function.rst | 2 +- doc/reference/{c++ => }/clef/function_0.cpp | 0 doc/reference/{c++ => }/clef/introduction.rst | 2 +- .../{c++ => }/clef/introduction_0.cpp | 0 doc/reference/{c++ => }/clef/overload.rst | 8 +- doc/reference/{c++ => }/clef/overload_0.cpp | 0 doc/reference/{c++ => }/clef/overload_1.cpp | 0 doc/reference/{c++ => }/clef/overload_2.cpp | 0 doc/reference/{c++ => }/conventions.rst | 4 +- .../CMakeLists.txt | 0 .../behind.rst | 0 .../contents.rst | 6 +- .../det_manip.rst | 12 +- .../det_manip_0.cpp | 0 .../{c++/gf => gfs/c++}/CMakeLists.txt | 0 doc/reference/{c++/gf => gfs/c++}/clef.rst | 6 +- doc/reference/{c++/gf => gfs/c++}/clef_0.cpp | 0 .../{c++/gf => gfs/c++}/concepts.rst | 40 ++--- .../{c++/gf => gfs/c++}/contents.rst | 7 +- .../{c++/gf => gfs/c++}/fit_tail.rst | 0 doc/reference/{c++/gf => gfs/c++}/fourier.rst | 2 +- .../{c++/gf => gfs/c++}/fourier_0.cpp | 0 .../gf => gfs/c++}/fourier_impl_notes.rst | 2 +- .../{c++/gf => gfs/c++}/gf_and_view.rst | 4 +- .../{c++/gf => gfs/c++}/gf_assign.rst | 0 .../{c++/gf => gfs/c++}/gf_block.rst | 2 +- .../{c++/gf => gfs/c++}/gf_block_0.cpp | 0 doc/reference/{c++/gf => gfs/c++}/gf_call.rst | 6 +- .../{c++/gf => gfs/c++}/gf_constructors.rst | 12 +- .../{c++/gf => gfs/c++}/gf_constructors_0.cpp | 0 doc/reference/{c++/gf => gfs/c++}/gf_data.rst | 0 .../{c++/gf => gfs/c++}/gf_imfreq.rst | 18 +-- .../{c++/gf => gfs/c++}/gf_imfreq_0.cpp | 0 .../{c++/gf => gfs/c++}/gf_imtime.rst | 18 +-- .../{c++/gf => gfs/c++}/gf_imtime_0.cpp | 0 .../{c++/gf => gfs/c++}/gf_legendre.rst | 4 +- .../{c++/gf => gfs/c++}/gf_legendre_0.cpp | 0 doc/reference/{c++/gf => gfs/c++}/gf_misc.rst | 0 .../gf => gfs/c++}/gf_part_eval_curry.rst | 0 .../gf => gfs/c++}/gf_part_eval_curry_0.cpp | 0 .../gf => gfs/c++}/gf_part_eval_curry_1.cpp | 0 .../{c++/gf => gfs/c++}/gf_product.rst | 2 +- .../{c++/gf => gfs/c++}/gf_product_0.cpp | 0 .../{c++/gf => gfs/c++}/gf_refreq.rst | 16 +- .../{c++/gf => gfs/c++}/gf_refreq_0.cpp | 0 .../{c++/gf => gfs/c++}/gf_reinterpret.rst | 0 .../{c++/gf => gfs/c++}/gf_retime.rst | 16 +- .../{c++/gf => gfs/c++}/gf_retime_0.cpp | 0 .../{c++/gf => gfs/c++}/gf_special.rst | 0 .../{c++/gf => gfs/c++}/gf_subscript.rst | 2 +- .../gf => gfs/c++}/implementation_notes.rst | 0 doc/reference/{c++/gf => gfs/c++}/intro.rst | 4 +- .../gf => gfs/c++}/matsubara_freq_mesh.rst | 0 .../gf => gfs/c++}/matsubara_freq_mesh_0.cpp | 0 .../{c++/gf => gfs/c++}/meshes.rst.old | 0 doc/reference/{c++/gf => gfs/c++}/plan.txt | 0 doc/reference/{c++/gf => gfs/c++}/tail.rst | 0 doc/reference/{c++/gf => gfs/c++}/tail_0.cpp | 0 doc/reference/{c++/gf => gfs/c++}/tail_1.cpp | 0 .../{c++/gf => gfs/c++}/tail_fit_0.cpp | 0 doc/reference/gfs/contents.rst | 14 ++ .../{python/green => gfs/py}/block.rst | 8 +- .../green => gfs/py}/block/GfImFreq.rst | 6 +- .../green => gfs/py}/block/GfImTime.rst | 6 +- .../green => gfs/py}/block/GfLegendre.rst | 4 +- .../green => gfs/py}/block/GfReFreq.rst | 8 +- .../green => gfs/py}/block/GfReTime.rst | 6 +- .../green => gfs/py}/block/green_imfreq.py | 0 .../green => gfs/py}/block/green_imtime.py | 0 .../green => gfs/py}/block/green_legendre.py | 0 .../green => gfs/py}/block/green_pade.py | 0 .../green => gfs/py}/block/green_refreq.py | 0 .../green => gfs/py}/block/green_retime.py | 0 .../green/green.rst => gfs/py/contents.rst} | 4 +- .../{python/green => gfs/py}/descriptors.rst | 0 .../{python/green => gfs/py}/example.py | 0 .../{python/green => gfs/py}/fourier.py | 0 .../{python/green => gfs/py}/full.rst | 16 +- .../{python/green => gfs/py}/impinbath.py | 0 .../{python/green => gfs/py}/legendre.py | 0 .../{python/green => gfs/py}/tail.rst | 2 +- .../{python/green => gfs/py}/transforms.rst | 4 +- .../{python/green => gfs/py}/tutorial.rst | 10 +- doc/reference/hdf5/contents.rst | 8 + .../lattice => lattice_tools}/bravais.rst | 0 .../contents.rst} | 4 +- .../{python/lattice => lattice_tools}/dos.rst | 2 +- .../{python/lattice => lattice_tools}/ex1.png | Bin .../{python/lattice => lattice_tools}/ex1.py | 0 .../{python/lattice => lattice_tools}/ex2.py | 0 .../lattice => lattice_tools}/hilbert.rst | 14 +- .../lattice => lattice_tools}/sumk.rst | 0 .../tightbinding.rst | 0 .../tightbinding_and_example.rst | 2 +- .../mctools => montecarlo}/CMakeLists.txt | 0 .../intro.rst => montecarlo/contents.rst} | 0 .../{c++/mctools => montecarlo}/ising.rst | 14 +- .../{c++/mctools => montecarlo}/loop.png | Bin .../{c++/mctools => montecarlo}/loop.rst | 0 .../{c++/mctools => montecarlo}/overview.rst | 14 +- .../{c++/mctools => montecarlo}/random.rst | 0 .../{c++/mctools => montecarlo}/reference.rst | 4 +- .../operators.rst => operators/contents.rst} | 6 +- .../contents.rst | 2 +- .../fit/demo1.py | 0 .../fit/demo1_prepare.py | 0 .../fit/fit.png | Bin .../fit/fit.rst | 6 +- .../fit/fit_test.py | 0 .../hdf5/contents.rst | 8 +- .../hdf5/protocol1.rst | 14 +- .../hdf5/protocol2.rst | 0 .../hdf5/ref.rst | 20 +-- .../hdf5/tut_ex1.rst | 4 +- .../hdf5/tut_ex2.rst | 4 +- .../hdf5/tut_ex3.rst | 6 +- .../hdf5/tut_ex3b.png | Bin .../hdf5/tut_ex3b.py | 0 .../hdf5/tut_hdf1.png | Bin .../hdf5/tutorial.rst | 0 .../plotting/example.png | Bin .../plotting/example.py | 0 .../plotting/myobject.png | Bin .../plotting/myobject.py | 0 .../plotting/myobject2.png | Bin .../plotting/myobject2.py | 0 .../plotting/plotting.rst | 20 +-- .../provenance.rst | 0 doc/reference/python/contents.rst | 18 --- .../python/parameters/parameters.rst | 8 - .../contents.rst} | 6 +- .../random => random_generator}/random.py | 0 .../CMakeLists.txt | 0 .../autocorrelation_time.rst | 0 .../binning.rst | 0 .../binning_0.cpp | 0 .../contents.rst | 0 .../contents_0.cpp | 0 .../ising2d.rst | 0 .../jackknife.rst | 0 .../jackknife_0.cpp | 0 .../statistics => statistical_analysis}/src | 0 .../{c++ => }/using_the_lib/CMakeLists.txt | 0 .../{c++ => }/using_the_lib/contents.rst | 14 +- .../{c++ => }/using_the_lib/profiling.rst | 6 +- .../{c++ => }/using_the_lib/triqs_library.rst | 0 .../{c++ => }/utilities/CMakeLists.txt | 0 .../{c++ => }/utilities/contents.rst | 2 +- .../{c++ => }/utilities/exceptions.rst | 4 +- .../{c++ => }/utilities/exceptions_0.cpp | 0 .../{c++ => }/utilities/exceptions_1.cpp | 0 .../utilities/python_include_mess.rst | 2 +- .../{c++ => }/utilities/tupletools.rst | 38 ++--- .../{c++ => }/utilities/tupletools_0.cpp | 0 .../{c++ => }/utilities/tupletools_1.cpp | 0 .../{c++ => }/utilities/tupletools_2.cpp | 0 .../{c++ => }/utilities/tupletools_3.cpp | 0 .../{c++ => }/utilities/tupletools_4.cpp | 0 .../{c++ => }/utilities/tupletools_called.cpp | 0 .../utilities/tupletools_reverse.cpp | 0 .../{python => }/wrap_generator/cfunction.rst | 0 .../{python => }/wrap_generator/class.rst | 0 .../{python => }/wrap_generator/contents.rst | 0 .../{python => }/wrap_generator/module.rst | 0 doc/{tutorials/c++ => tour}/CMakeLists.txt | 1 - doc/{tutorials/python => tour}/aim_plot.png | Bin doc/{tutorials/python => tour}/aim_plot.py | 0 doc/{tutorials/python => tour}/contents.rst | 0 doc/{tutorials/python => tour}/ctqmc.rst | 6 +- doc/{tutorials/python => tour}/dmft.py | 0 doc/{tutorials/python => tour}/dmft.rst | 4 +- .../getting_started}/get_started.rst | 0 doc/{tutorials/python => tour}/green.rst | 4 +- doc/{tutorials/python => tour}/ipt.rst | 2 +- doc/{tutorials/python => tour}/ipt_dmft.py | 0 doc/{tutorials/python => tour}/ipt_full.py | 0 doc/{tutorials/python => tour}/ipt_solver.py | 0 doc/{tutorials/python => tour}/mott.gif | Bin .../python => tour}/tight_binding.rst | 4 +- doc/tutorials/CMakeLists.txt | 2 +- doc/tutorials/{c++ => }/array_tutorial.rst | 2 +- doc/tutorials/{c++ => }/array_tutorial_0.cpp | 0 doc/tutorials/{c++ => }/array_tutorial_1.cpp | 0 doc/tutorials/{c++ => }/array_tutorial_2.cpp | 0 doc/tutorials/{c++ => }/array_tutorial_3.cpp | 0 doc/tutorials/{c++ => }/array_tutorial_4.cpp | 0 doc/tutorials/{c++ => }/array_tutorial_5.cpp | 0 doc/tutorials/{c++ => }/array_tutorial_6.cpp | 0 doc/tutorials/{c++ => }/array_tutorial_7.cpp | 0 doc/tutorials/{c++ => }/contents.rst | 0 .../{c++ => }/det_manip_tutorial.rst | 4 +- .../{c++ => }/det_manip_tutorial_0.cpp | 0 .../{c++ => }/det_manip_tutorial_1.cpp | 0 .../{c++ => }/det_manip_tutorial_2.cpp | 0 .../{c++ => }/det_manip_tutorial_3.cpp | 0 .../{c++ => }/det_manip_tutorial_4.cpp | 0 .../{c++ => }/det_manip_tutorial_5.cpp | 0 .../{c++ => }/det_manip_tutorial_6.cpp | 0 doc/tutorials/{c++ => }/gfs_tutorial.rst | 2 +- doc/tutorials/{c++ => }/gfs_tutorial_0.cpp | 0 doc/tutorials/{c++ => }/gfs_tutorial_1.cpp | 0 doc/tutorials/{c++ => }/gfs_tutorial_2.cpp | 0 doc/tutorials/{c++ => }/gfs_tutorial_3.cpp | 0 doc/tutorials/{c++ => }/gfs_tutorial_4.cpp | 0 doc/tutorials/{c++ => }/gfs_tutorial_5.cpp | 0 doc/tutorials/{c++ => }/gfs_tutorial_6.cpp | 0 316 files changed, 519 insertions(+), 696 deletions(-) rename doc/reference/{c++ => }/CMakeLists.txt (93%) rename doc/reference/{c++ => }/arrays/CMakeLists.txt (100%) rename doc/reference/{c++ => }/arrays/FAQ.rst (97%) rename doc/reference/{c++ => }/arrays/H5.rst (100%) rename doc/reference/{c++ => }/arrays/IO.rst (100%) rename doc/reference/{c++ => }/arrays/IO_0.cpp (100%) rename doc/reference/{c++ => }/arrays/Interop_Python.rst (100%) rename doc/reference/{c++ => }/arrays/algebras.rst (89%) rename doc/reference/{c++ => }/arrays/algebras_0.cpp (100%) rename doc/reference/{c++ => }/arrays/algebras_1.cpp (100%) rename doc/reference/{c++ => }/arrays/blas_lapack.rst (95%) rename doc/reference/{c++ => }/arrays/blas_lapack_0.cpp (100%) rename doc/reference/{c++ => }/arrays/concepts.rst (89%) rename doc/reference/{c++ => }/arrays/concepts_0.cpp (100%) rename doc/reference/{c++ => }/arrays/containers/CMakeLists.txt (100%) rename doc/reference/{c++ => }/arrays/containers/STL.rst (71%) rename doc/reference/{c++ => }/arrays/containers/STL_0.cpp (100%) rename doc/reference/{c++ => }/arrays/containers/call.rst (91%) rename doc/reference/{c++ => }/arrays/containers/call_0.cpp (100%) rename doc/reference/{c++ => }/arrays/containers/call_1.cpp (100%) rename doc/reference/{c++ => }/arrays/containers/call_2.cpp (100%) rename doc/reference/{c++ => }/arrays/containers/compound_ops.rst (85%) rename doc/reference/{c++ => }/arrays/containers/memory.rst (100%) rename doc/reference/{c++ => }/arrays/containers/range_ell.rst (68%) rename doc/reference/{c++ => }/arrays/containers/range_ell_0.cpp (100%) rename doc/reference/{c++ => }/arrays/containers/range_ell_1.cpp (100%) rename doc/reference/{c++ => }/arrays/containers/rebind.rst (97%) rename doc/reference/{c++ => }/arrays/containers/reg_assign.rst (88%) rename doc/reference/{c++ => }/arrays/containers/reg_constructors.rst (100%) rename doc/reference/{c++ => }/arrays/containers/reg_constructors_0.cpp (100%) rename doc/reference/{c++ => }/arrays/containers/regular.rst (94%) rename doc/reference/{c++ => }/arrays/containers/resize.rst (77%) rename doc/reference/{c++ => }/arrays/containers/resize_0.cpp (100%) rename doc/reference/{c++ => }/arrays/containers/resize_1.cpp (100%) rename doc/reference/{c++ => }/arrays/containers/stream.rst (100%) rename doc/reference/{c++ => }/arrays/containers/swap.rst (93%) rename doc/reference/{c++ => }/arrays/containers/swap_0.cpp (100%) rename doc/reference/{c++ => }/arrays/containers/swap_1.cpp (100%) rename doc/reference/{c++ => }/arrays/containers/template_parameters.rst (85%) rename doc/reference/{c++ => }/arrays/containers/view_assign.rst (86%) rename doc/reference/{c++ => }/arrays/containers/view_constructors.rst (100%) rename doc/reference/{c++ => }/arrays/containers/views.rst (98%) rename doc/reference/{c++ => }/arrays/contents.rst (100%) rename doc/reference/{c++ => }/arrays/debug.rst (94%) rename doc/reference/{c++ => }/arrays/debug_0.cpp (100%) rename doc/reference/{c++ => }/arrays/examples_h5/h5_rw.cpp (100%) rename doc/reference/{c++ => }/arrays/examples_h5/h5_rw.output (100%) rename doc/reference/{c++ => }/arrays/examples_h5/h5_stack_ex.cpp (100%) rename doc/reference/{c++ => }/arrays/examples_h5/h5_stack_ex.output (100%) rename doc/reference/{c++ => }/arrays/examples_h5/h5_stack_ex_sca.cpp (100%) rename doc/reference/{c++ => }/arrays/examples_h5/h5_stack_ex_sca.output (100%) rename doc/reference/{c++ => }/arrays/foreach.rst (97%) rename doc/reference/{c++ => }/arrays/foreach_0.cpp (100%) rename doc/reference/{c++ => }/arrays/foreach_1.cpp (100%) rename doc/reference/{c++ => }/arrays/group_indices.rst (92%) rename doc/reference/{c++ => }/arrays/h5_complex.rst (100%) rename doc/reference/{c++ => }/arrays/h5_proxy.rst (93%) rename doc/reference/{c++ => }/arrays/h5_rw.rst (92%) rename doc/reference/{c++ => }/arrays/h5_rw_0.cpp (100%) rename doc/reference/{c++ => }/arrays/h5_stack.rst (91%) rename doc/reference/{c++ => }/arrays/implementation_notes/assignment.rst (100%) rename doc/reference/{c++ => }/arrays/implementation_notes/concepts.rst (92%) rename doc/reference/{c++ => }/arrays/implementation_notes/contents.rst (100%) rename doc/reference/{c++ => }/arrays/implementation_notes/cuboid_formula.rst (77%) rename doc/reference/{c++ => }/arrays/implementation_notes/expression_template.rst (100%) rename doc/reference/{c++ => }/arrays/implementation_notes/functional.rst (66%) rename doc/reference/{c++ => }/arrays/implementation_notes/hdf5.rst (100%) rename doc/reference/{c++ => }/arrays/implementation_notes/indexmaps.rst (88%) rename doc/reference/{c++ => }/arrays/implementation_notes/isp.rst (70%) rename doc/reference/{c++ => }/arrays/implementation_notes/linalg.rst (100%) rename doc/reference/{c++ => }/arrays/implementation_notes/python.rst (53%) rename doc/reference/{c++ => }/arrays/implementation_notes/reinterpretation.rst (100%) rename doc/reference/{c++ => }/arrays/implementation_notes/slicing.rst (73%) rename doc/reference/{c++ => }/arrays/implementation_notes/storage.rst (89%) rename doc/reference/{c++ => }/arrays/implementation_notes/strategy.rst (69%) rename doc/reference/{c++ => }/arrays/implementation_notes/userclasses.rst (80%) rename doc/reference/{c++ => }/arrays/introduction.rst (83%) rename doc/reference/{c++ => }/arrays/lazy.rst (88%) rename doc/reference/{c++ => }/arrays/lazy_0.cpp (100%) rename doc/reference/{c++ => }/arrays/map.rst (91%) rename doc/reference/{c++ => }/arrays/map_0.cpp (100%) rename doc/reference/{c++ => }/arrays/map_1.cpp (100%) rename doc/reference/{c++ => }/arrays/multithreading.rst (100%) rename doc/reference/{c++ => }/arrays/play_with_concept.rst (73%) rename doc/reference/{c++ => }/arrays/play_with_concept_0.cpp (100%) rename doc/reference/{c++ => }/arrays/shape.rst (100%) rename doc/reference/{c++ => }/arrays/shape_0.cpp (100%) rename doc/reference/{c++ => }/arrays/simple_fnt.rst (100%) rename doc/reference/{c++ => }/arrays/simple_fnt_0.cpp (100%) rename doc/reference/{c++ => }/arrays/view_or_not_view.rst (99%) delete mode 100644 doc/reference/c++/contents.rst delete mode 100644 doc/reference/c++/parameters/CMakeLists.txt delete mode 100644 doc/reference/c++/parameters/parameters.rst delete mode 100644 doc/reference/c++/parameters/parameters_0.cpp delete mode 100644 doc/reference/c++/parameters/parameters_1.cpp rename doc/reference/{c++ => }/clef/CMakeLists.txt (100%) rename doc/reference/{c++ => }/clef/assign.rst (98%) rename doc/reference/{c++ => }/clef/assign_0.cpp (100%) rename doc/reference/{c++ => }/clef/assign_1.cpp (100%) rename doc/reference/{c++ => }/clef/contents.rst (84%) rename doc/reference/{c++ => }/clef/examples/contents.rst (100%) rename doc/reference/{c++ => }/clef/examples/lazy_sum.rst (100%) rename doc/reference/{c++ => }/clef/examples/src (100%) rename doc/reference/{c++ => }/clef/expressions_eval.rst (89%) rename doc/reference/{c++ => }/clef/expressions_eval_0.cpp (100%) rename doc/reference/{c++ => }/clef/expressions_form.rst (79%) rename doc/reference/{c++ => }/clef/expressions_form_0.cpp (100%) rename doc/reference/{c++ => }/clef/function.rst (99%) rename doc/reference/{c++ => }/clef/function_0.cpp (100%) rename doc/reference/{c++ => }/clef/introduction.rst (83%) rename doc/reference/{c++ => }/clef/introduction_0.cpp (100%) rename doc/reference/{c++ => }/clef/overload.rst (91%) rename doc/reference/{c++ => }/clef/overload_0.cpp (100%) rename doc/reference/{c++ => }/clef/overload_1.cpp (100%) rename doc/reference/{c++ => }/clef/overload_2.cpp (100%) rename doc/reference/{c++ => }/conventions.rst (97%) rename doc/reference/{c++/det_manip => determinant_manipulation}/CMakeLists.txt (100%) rename doc/reference/{c++/det_manip => determinant_manipulation}/behind.rst (100%) rename doc/reference/{c++/det_manip => determinant_manipulation}/contents.rst (93%) rename doc/reference/{c++/det_manip => determinant_manipulation}/det_manip.rst (97%) rename doc/reference/{c++/det_manip => determinant_manipulation}/det_manip_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/CMakeLists.txt (100%) rename doc/reference/{c++/gf => gfs/c++}/clef.rst (89%) rename doc/reference/{c++/gf => gfs/c++}/clef_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/concepts.rst (90%) rename doc/reference/{c++/gf => gfs/c++}/contents.rst (69%) rename doc/reference/{c++/gf => gfs/c++}/fit_tail.rst (100%) rename doc/reference/{c++/gf => gfs/c++}/fourier.rst (98%) rename doc/reference/{c++/gf => gfs/c++}/fourier_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/fourier_impl_notes.rst (99%) rename doc/reference/{c++/gf => gfs/c++}/gf_and_view.rst (98%) rename doc/reference/{c++/gf => gfs/c++}/gf_assign.rst (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_block.rst (99%) rename doc/reference/{c++/gf => gfs/c++}/gf_block_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_call.rst (87%) rename doc/reference/{c++/gf => gfs/c++}/gf_constructors.rst (80%) rename doc/reference/{c++/gf => gfs/c++}/gf_constructors_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_data.rst (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_imfreq.rst (82%) rename doc/reference/{c++/gf => gfs/c++}/gf_imfreq_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_imtime.rst (84%) rename doc/reference/{c++/gf => gfs/c++}/gf_imtime_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_legendre.rst (93%) rename doc/reference/{c++/gf => gfs/c++}/gf_legendre_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_misc.rst (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_part_eval_curry.rst (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_part_eval_curry_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_part_eval_curry_1.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_product.rst (99%) rename doc/reference/{c++/gf => gfs/c++}/gf_product_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_refreq.rst (84%) rename doc/reference/{c++/gf => gfs/c++}/gf_refreq_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_reinterpret.rst (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_retime.rst (84%) rename doc/reference/{c++/gf => gfs/c++}/gf_retime_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_special.rst (100%) rename doc/reference/{c++/gf => gfs/c++}/gf_subscript.rst (94%) rename doc/reference/{c++/gf => gfs/c++}/implementation_notes.rst (100%) rename doc/reference/{c++/gf => gfs/c++}/intro.rst (84%) rename doc/reference/{c++/gf => gfs/c++}/matsubara_freq_mesh.rst (100%) rename doc/reference/{c++/gf => gfs/c++}/matsubara_freq_mesh_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/meshes.rst.old (100%) rename doc/reference/{c++/gf => gfs/c++}/plan.txt (100%) rename doc/reference/{c++/gf => gfs/c++}/tail.rst (100%) rename doc/reference/{c++/gf => gfs/c++}/tail_0.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/tail_1.cpp (100%) rename doc/reference/{c++/gf => gfs/c++}/tail_fit_0.cpp (100%) create mode 100644 doc/reference/gfs/contents.rst rename doc/reference/{python/green => gfs/py}/block.rst (96%) rename doc/reference/{python/green => gfs/py}/block/GfImFreq.rst (95%) rename doc/reference/{python/green => gfs/py}/block/GfImTime.rst (94%) rename doc/reference/{python/green => gfs/py}/block/GfLegendre.rst (96%) rename doc/reference/{python/green => gfs/py}/block/GfReFreq.rst (94%) rename doc/reference/{python/green => gfs/py}/block/GfReTime.rst (95%) rename doc/reference/{python/green => gfs/py}/block/green_imfreq.py (100%) rename doc/reference/{python/green => gfs/py}/block/green_imtime.py (100%) rename doc/reference/{python/green => gfs/py}/block/green_legendre.py (100%) rename doc/reference/{python/green => gfs/py}/block/green_pade.py (100%) rename doc/reference/{python/green => gfs/py}/block/green_refreq.py (100%) rename doc/reference/{python/green => gfs/py}/block/green_retime.py (100%) rename doc/reference/{python/green/green.rst => gfs/py/contents.rst} (95%) rename doc/reference/{python/green => gfs/py}/descriptors.rst (100%) rename doc/reference/{python/green => gfs/py}/example.py (100%) rename doc/reference/{python/green => gfs/py}/fourier.py (100%) rename doc/reference/{python/green => gfs/py}/full.rst (91%) rename doc/reference/{python/green => gfs/py}/impinbath.py (100%) rename doc/reference/{python/green => gfs/py}/legendre.py (100%) rename doc/reference/{python/green => gfs/py}/tail.rst (98%) rename doc/reference/{python/green => gfs/py}/transforms.rst (91%) rename doc/reference/{python/green => gfs/py}/tutorial.rst (94%) create mode 100644 doc/reference/hdf5/contents.rst rename doc/reference/{python/lattice => lattice_tools}/bravais.rst (100%) rename doc/reference/{python/lattice/lattice.rst => lattice_tools/contents.rst} (93%) rename doc/reference/{python/lattice => lattice_tools}/dos.rst (95%) rename doc/reference/{python/lattice => lattice_tools}/ex1.png (100%) rename doc/reference/{python/lattice => lattice_tools}/ex1.py (100%) rename doc/reference/{python/lattice => lattice_tools}/ex2.py (100%) rename doc/reference/{python/lattice => lattice_tools}/hilbert.rst (86%) rename doc/reference/{python/lattice => lattice_tools}/sumk.rst (100%) rename doc/reference/{python/lattice => lattice_tools}/tightbinding.rst (100%) rename doc/reference/{python/lattice => lattice_tools}/tightbinding_and_example.rst (98%) rename doc/reference/{c++/mctools => montecarlo}/CMakeLists.txt (100%) rename doc/reference/{c++/mctools/intro.rst => montecarlo/contents.rst} (100%) rename doc/reference/{c++/mctools => montecarlo}/ising.rst (93%) rename doc/reference/{c++/mctools => montecarlo}/loop.png (100%) rename doc/reference/{c++/mctools => montecarlo}/loop.rst (100%) rename doc/reference/{c++/mctools => montecarlo}/overview.rst (96%) rename doc/reference/{c++/mctools => montecarlo}/random.rst (100%) rename doc/reference/{c++/mctools => montecarlo}/reference.rst (99%) rename doc/reference/{python/operators/operators.rst => operators/contents.rst} (85%) rename doc/reference/{python/data_analysis => plotting_protocols}/contents.rst (96%) rename doc/reference/{python/data_analysis => plotting_protocols}/fit/demo1.py (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/fit/demo1_prepare.py (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/fit/fit.png (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/fit/fit.rst (82%) rename doc/reference/{python/data_analysis => plotting_protocols}/fit/fit_test.py (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/hdf5/contents.rst (85%) rename doc/reference/{python/data_analysis => plotting_protocols}/hdf5/protocol1.rst (88%) rename doc/reference/{python/data_analysis => plotting_protocols}/hdf5/protocol2.rst (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/hdf5/ref.rst (90%) rename doc/reference/{python/data_analysis => plotting_protocols}/hdf5/tut_ex1.rst (92%) rename doc/reference/{python/data_analysis => plotting_protocols}/hdf5/tut_ex2.rst (94%) rename doc/reference/{python/data_analysis => plotting_protocols}/hdf5/tut_ex3.rst (89%) rename doc/reference/{python/data_analysis => plotting_protocols}/hdf5/tut_ex3b.png (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/hdf5/tut_ex3b.py (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/hdf5/tut_hdf1.png (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/hdf5/tutorial.rst (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/plotting/example.png (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/plotting/example.py (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/plotting/myobject.png (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/plotting/myobject.py (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/plotting/myobject2.png (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/plotting/myobject2.py (100%) rename doc/reference/{python/data_analysis => plotting_protocols}/plotting/plotting.rst (80%) rename doc/reference/{python/data_analysis => plotting_protocols}/provenance.rst (100%) delete mode 100644 doc/reference/python/contents.rst delete mode 100644 doc/reference/python/parameters/parameters.rst rename doc/reference/{python/random/random.rst => random_generator/contents.rst} (91%) rename doc/reference/{python/random => random_generator}/random.py (100%) rename doc/reference/{c++/statistics => statistical_analysis}/CMakeLists.txt (100%) rename doc/reference/{c++/statistics => statistical_analysis}/autocorrelation_time.rst (100%) rename doc/reference/{c++/statistics => statistical_analysis}/binning.rst (100%) rename doc/reference/{c++/statistics => statistical_analysis}/binning_0.cpp (100%) rename doc/reference/{c++/statistics => statistical_analysis}/contents.rst (100%) rename doc/reference/{c++/statistics => statistical_analysis}/contents_0.cpp (100%) rename doc/reference/{c++/statistics => statistical_analysis}/ising2d.rst (100%) rename doc/reference/{c++/statistics => statistical_analysis}/jackknife.rst (100%) rename doc/reference/{c++/statistics => statistical_analysis}/jackknife_0.cpp (100%) rename doc/reference/{c++/statistics => statistical_analysis}/src (100%) rename doc/reference/{c++ => }/using_the_lib/CMakeLists.txt (100%) rename doc/reference/{c++ => }/using_the_lib/contents.rst (63%) rename doc/reference/{c++ => }/using_the_lib/profiling.rst (90%) rename doc/reference/{c++ => }/using_the_lib/triqs_library.rst (100%) rename doc/reference/{c++ => }/utilities/CMakeLists.txt (100%) rename doc/reference/{c++ => }/utilities/contents.rst (82%) rename doc/reference/{c++ => }/utilities/exceptions.rst (94%) rename doc/reference/{c++ => }/utilities/exceptions_0.cpp (100%) rename doc/reference/{c++ => }/utilities/exceptions_1.cpp (100%) rename doc/reference/{c++ => }/utilities/python_include_mess.rst (98%) rename doc/reference/{c++ => }/utilities/tupletools.rst (84%) rename doc/reference/{c++ => }/utilities/tupletools_0.cpp (100%) rename doc/reference/{c++ => }/utilities/tupletools_1.cpp (100%) rename doc/reference/{c++ => }/utilities/tupletools_2.cpp (100%) rename doc/reference/{c++ => }/utilities/tupletools_3.cpp (100%) rename doc/reference/{c++ => }/utilities/tupletools_4.cpp (100%) rename doc/reference/{c++ => }/utilities/tupletools_called.cpp (100%) rename doc/reference/{c++ => }/utilities/tupletools_reverse.cpp (100%) rename doc/reference/{python => }/wrap_generator/cfunction.rst (100%) rename doc/reference/{python => }/wrap_generator/class.rst (100%) rename doc/reference/{python => }/wrap_generator/contents.rst (100%) rename doc/reference/{python => }/wrap_generator/module.rst (100%) rename doc/{tutorials/c++ => tour}/CMakeLists.txt (92%) rename doc/{tutorials/python => tour}/aim_plot.png (100%) rename doc/{tutorials/python => tour}/aim_plot.py (100%) rename doc/{tutorials/python => tour}/contents.rst (100%) rename doc/{tutorials/python => tour}/ctqmc.rst (95%) rename doc/{tutorials/python => tour}/dmft.py (100%) rename doc/{tutorials/python => tour}/dmft.rst (94%) rename doc/{reference/python/start => tour/getting_started}/get_started.rst (100%) rename doc/{tutorials/python => tour}/green.rst (91%) rename doc/{tutorials/python => tour}/ipt.rst (98%) rename doc/{tutorials/python => tour}/ipt_dmft.py (100%) rename doc/{tutorials/python => tour}/ipt_full.py (100%) rename doc/{tutorials/python => tour}/ipt_solver.py (100%) rename doc/{tutorials/python => tour}/mott.gif (100%) rename doc/{tutorials/python => tour}/tight_binding.rst (81%) rename doc/tutorials/{c++ => }/array_tutorial.rst (98%) rename doc/tutorials/{c++ => }/array_tutorial_0.cpp (100%) rename doc/tutorials/{c++ => }/array_tutorial_1.cpp (100%) rename doc/tutorials/{c++ => }/array_tutorial_2.cpp (100%) rename doc/tutorials/{c++ => }/array_tutorial_3.cpp (100%) rename doc/tutorials/{c++ => }/array_tutorial_4.cpp (100%) rename doc/tutorials/{c++ => }/array_tutorial_5.cpp (100%) rename doc/tutorials/{c++ => }/array_tutorial_6.cpp (100%) rename doc/tutorials/{c++ => }/array_tutorial_7.cpp (100%) rename doc/tutorials/{c++ => }/contents.rst (100%) rename doc/tutorials/{c++ => }/det_manip_tutorial.rst (89%) rename doc/tutorials/{c++ => }/det_manip_tutorial_0.cpp (100%) rename doc/tutorials/{c++ => }/det_manip_tutorial_1.cpp (100%) rename doc/tutorials/{c++ => }/det_manip_tutorial_2.cpp (100%) rename doc/tutorials/{c++ => }/det_manip_tutorial_3.cpp (100%) rename doc/tutorials/{c++ => }/det_manip_tutorial_4.cpp (100%) rename doc/tutorials/{c++ => }/det_manip_tutorial_5.cpp (100%) rename doc/tutorials/{c++ => }/det_manip_tutorial_6.cpp (100%) rename doc/tutorials/{c++ => }/gfs_tutorial.rst (98%) rename doc/tutorials/{c++ => }/gfs_tutorial_0.cpp (100%) rename doc/tutorials/{c++ => }/gfs_tutorial_1.cpp (100%) rename doc/tutorials/{c++ => }/gfs_tutorial_2.cpp (100%) rename doc/tutorials/{c++ => }/gfs_tutorial_3.cpp (100%) rename doc/tutorials/{c++ => }/gfs_tutorial_4.cpp (100%) rename doc/tutorials/{c++ => }/gfs_tutorial_5.cpp (100%) rename doc/tutorials/{c++ => }/gfs_tutorial_6.cpp (100%) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index df17f3e7..2f1a1644 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -53,8 +53,9 @@ ENDFOREACH() endmacro() # Dive and find the doxygen sources -add_subdirectory(reference/c++) -add_subdirectory(tutorials/c++) +add_subdirectory(reference/) +add_subdirectory(tutorials/) +add_subdirectory(tour/) # Build the doxygen set(DOXYGEN_HTML_OUTPUT ./html/doxy_triqs) diff --git a/doc/conf.py.in b/doc/conf.py.in index 4e376935..eda11cbc 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -124,7 +124,7 @@ pygments_style = 'sphinx' # Options for doxylink extension # ----------------------------- -doxylink = { 'doxy' : ('@CMAKE_CURRENT_BINARY_DIR@/doxy.tag', 'doxy_triqs') } +doxylink = { 'doxy': ('@CMAKE_CURRENT_BINARY_DIR@/doxy.tag', 'doxy_triqs') } # Options for HTML output @@ -146,7 +146,7 @@ html_context = {'header_title': 'triqs', ['About TRIQS', 'about'] ]} -#html_theme_options = { "pagewidth": "80em", "documentwidth" : "60em" } +#html_theme_options = { "pagewidth": "80em", "documentwidth": "60em" } # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". diff --git a/doc/documentation.rst b/doc/documentation.rst index 640eb72e..15fb7c84 100644 --- a/doc/documentation.rst +++ b/doc/documentation.rst @@ -6,22 +6,68 @@ Documentation A quick tour ------------ +A little tour of some aspects of TRIQS and its applications, at the Python level. + .. toctree:: :maxdepth: 1 - tutorials/python/contents - tutorials/c++/contents + tour/getting_started/get_started + tour/green + tour/tight_binding + tour/ctqmc + tour/dmft + tour/ipt + + +Tutorials +---------- + +Learn how to use TRIQS step by step, both in Python and c++ ! + +.. toctree:: + :maxdepth: 1 + + tutorials/gfs_tutorial + tutorials/array_tutorial + tutorials/det_manip_tutorial + Reference manual ----------------- -This is the reference manual for the Python and the C++ libraries. +.. toctree:: + :maxdepth: 1 + + reference/using_the_lib/contents + +Code reference +~~~~~~~~~~~~~~~~ +.. toctree:: + :maxdepth: 1 + + reference/gfs/contents + reference/lattice_tools/contents + reference/plotting_protocols/contents + reference/montecarlo/contents + reference/operators/contents + reference/random_generator/contents + reference/arrays/contents + reference/clef/contents + reference/hdf5/contents + reference/determinant_manipulation/contents + reference/statistical_analysis/contents + + +Developer tools +~~~~~~~~~~~~~~~~~ .. toctree:: - :maxdepth: 2 + :maxdepth: 1 - reference/python/contents - reference/c++/contents + reference/conventions + reference/using_the_lib/profiling + reference/wrap_generator/contents + reference/utilities/contents Version compatibility --------------------- diff --git a/doc/reference/c++/CMakeLists.txt b/doc/reference/CMakeLists.txt similarity index 93% rename from doc/reference/c++/CMakeLists.txt rename to doc/reference/CMakeLists.txt index a0f81c22..b4408044 100644 --- a/doc/reference/c++/CMakeLists.txt +++ b/doc/reference/CMakeLists.txt @@ -1,4 +1 @@ - add_all_subdirectories_with_cmakelist() - - diff --git a/doc/reference/c++/arrays/CMakeLists.txt b/doc/reference/arrays/CMakeLists.txt similarity index 100% rename from doc/reference/c++/arrays/CMakeLists.txt rename to doc/reference/arrays/CMakeLists.txt diff --git a/doc/reference/c++/arrays/FAQ.rst b/doc/reference/arrays/FAQ.rst similarity index 97% rename from doc/reference/c++/arrays/FAQ.rst rename to doc/reference/arrays/FAQ.rst index eeb139e0..6444c569 100644 --- a/doc/reference/c++/arrays/FAQ.rst +++ b/doc/reference/arrays/FAQ.rst @@ -7,7 +7,7 @@ How do I iterate on my array ? ----------------------------------- -There are different way to iterate on the element of an array, recommended in this order from the most simple/efficient to the most complex/slow : +There are different way to iterate on the element of an array, recommended in this order from the most simple/efficient to the most complex/slow: * To assign data into an array, the simplest and efficient way is to use automatic assignment with lazy expressions, Cf :ref:`Lazy`. diff --git a/doc/reference/c++/arrays/H5.rst b/doc/reference/arrays/H5.rst similarity index 100% rename from doc/reference/c++/arrays/H5.rst rename to doc/reference/arrays/H5.rst diff --git a/doc/reference/c++/arrays/IO.rst b/doc/reference/arrays/IO.rst similarity index 100% rename from doc/reference/c++/arrays/IO.rst rename to doc/reference/arrays/IO.rst diff --git a/doc/reference/c++/arrays/IO_0.cpp b/doc/reference/arrays/IO_0.cpp similarity index 100% rename from doc/reference/c++/arrays/IO_0.cpp rename to doc/reference/arrays/IO_0.cpp diff --git a/doc/reference/c++/arrays/Interop_Python.rst b/doc/reference/arrays/Interop_Python.rst similarity index 100% rename from doc/reference/c++/arrays/Interop_Python.rst rename to doc/reference/arrays/Interop_Python.rst diff --git a/doc/reference/c++/arrays/algebras.rst b/doc/reference/arrays/algebras.rst similarity index 89% rename from doc/reference/c++/arrays/algebras.rst rename to doc/reference/arrays/algebras.rst index 4d1a6008..7bfd5324 100644 --- a/doc/reference/c++/arrays/algebras.rst +++ b/doc/reference/arrays/algebras.rst @@ -1,6 +1,6 @@ .. highlight:: c -Operations : array and matrix/vector algebras +Operations: array and matrix/vector algebras ======================================================= Arithmetic operations @@ -36,8 +36,8 @@ The principle is that the result of A+B is **NOT** an array, but a more complex the expression using the naturally recursive structure of templates. Expressions models :ref:`ImmutableCuboidArray` concept. -They behave like an immutable array : they have a domain, they can be evaluated. -Hence they can used *anywhere* an object modeling this concept is accepted, e.g. : +They behave like an immutable array: they have a domain, they can be evaluated. +Hence they can used *anywhere* an object modeling this concept is accepted, e.g.: * array, matrix contruction * operator =, +=, -=, ... @@ -51,15 +51,15 @@ This technique allows the elimination of temporaries, so that the clear and read is in fact rewritten by the compiler into :: - for (i,j,...) indices of A, B : + for (i,j,...) indices of A, B : C(i,j) = A(i,j) + 2* B(i,j) + C(i,j)/2 instead of making a chain of temporaries (C/2, 2*B, 2*B + C/2...) that "ordinary" object-oriented programming would produce. As a result, the produced code is as fast as if you were writing the loop yourself, but with several advantages: -* It is more **compact** and **readable** : you don't have to write the loop, and the indices range are computed automatically. -* It is much better for **optimization** : +* It is more **compact** and **readable**: you don't have to write the loop, and the indices range are computed automatically. +* It is much better for **optimization**: * What you want is to tell the compiler/library to compute this expression, not *how* to do it optimally on a given machine. * For example, since the traversal order of indices is decided at compile time, the library can traverse the data diff --git a/doc/reference/c++/arrays/algebras_0.cpp b/doc/reference/arrays/algebras_0.cpp similarity index 100% rename from doc/reference/c++/arrays/algebras_0.cpp rename to doc/reference/arrays/algebras_0.cpp diff --git a/doc/reference/c++/arrays/algebras_1.cpp b/doc/reference/arrays/algebras_1.cpp similarity index 100% rename from doc/reference/c++/arrays/algebras_1.cpp rename to doc/reference/arrays/algebras_1.cpp diff --git a/doc/reference/c++/arrays/blas_lapack.rst b/doc/reference/arrays/blas_lapack.rst similarity index 95% rename from doc/reference/c++/arrays/blas_lapack.rst rename to doc/reference/arrays/blas_lapack.rst index 588a834a..af301d0a 100644 --- a/doc/reference/c++/arrays/blas_lapack.rst +++ b/doc/reference/arrays/blas_lapack.rst @@ -23,7 +23,7 @@ matrix product The * operator map the matrix x matrix and matrix x vector product. -Example : matrix * matrix and * vector ... +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. @@ -36,7 +36,7 @@ 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 +Example: TO BE WRITTEN LU decomposition diff --git a/doc/reference/c++/arrays/blas_lapack_0.cpp b/doc/reference/arrays/blas_lapack_0.cpp similarity index 100% rename from doc/reference/c++/arrays/blas_lapack_0.cpp rename to doc/reference/arrays/blas_lapack_0.cpp diff --git a/doc/reference/c++/arrays/concepts.rst b/doc/reference/arrays/concepts.rst similarity index 89% rename from doc/reference/c++/arrays/concepts.rst rename to doc/reference/arrays/concepts.rst index c1ec58cd..ae395c1e 100644 --- a/doc/reference/c++/arrays/concepts.rst +++ b/doc/reference/arrays/concepts.rst @@ -35,14 +35,14 @@ object, without side effects. ImmutableCuboidArray ---------------------------- -* **Purpose** : +* **Purpose**: The most abstract definition of something that behaves like an immutable array on a cuboid domain. * it has a cuboid domain (hence a rank). * it can be evaluated on any value of the indices in the domain - * NB : It does not need to be stored in memory. For example, a formal expression models this concept. + * NB: It does not need to be stored in memory. For example, a formal expression models this concept. * **Definition** ([...] denotes something optional). @@ -58,7 +58,7 @@ ImmutableCuboidArray | value_type [const &] operator() (size_t ... i) const | Evaluation. Must have exactly rank argument (checked at compiled time). | +-------------------------------------------------------+-------------------------------------------------------------------------+ -* **Examples** : +* **Examples**: * array, array_view, matrix, matrix_view, vector, vector_view. * array expressions. @@ -67,8 +67,8 @@ ImmutableCuboidArray MutableCuboidArray ------------------------- -* **Purpose** : An array where the data can be modified. -* **Refines** : :ref:`ImmutableCuboidArray`. +* **Purpose**: An array where the data can be modified. +* **Refines**: :ref:`ImmutableCuboidArray`. * **Definition** @@ -78,7 +78,7 @@ MutableCuboidArray | value_type & operator() (size_t ... i) | Element access: Must have exactly rank argument (checked at compiled time). | +----------------------------------------------+-----------------------------------------------------------------------------+ -* **Examples** : +* **Examples**: * array, array_view, matrix, matrix_view, vector, vector_view. .. _ImmutableArray: @@ -92,7 +92,7 @@ ImmutableArray * ImmutableArray == true_type -NB : this traits marks the fact that X belongs to the Array algebra. +NB: this traits marks the fact that X belongs to the Array algebra. .. _ImmutableMatrix: @@ -101,12 +101,12 @@ ImmutableMatrix * Refines :ref:`ImmutableCuboidArray` -* If A is the type : +* If A is the type: * ImmutableMatrix == true_type * A::domain_type::rank == 2 -NB : this traits marks the fact that X belongs to the MatrixVector algebra. +NB: this traits marks the fact that X belongs to the MatrixVector algebra. .. _ImmutableVector: @@ -115,12 +115,12 @@ ImmutableVector * Refines :ref:`ImmutableCuboidArray` -* If A is the type : +* If A is the type: * ImmutableMatrix == true_type * A::domain_type::rank == 1 -NB : this traits marks the fact that X belongs to the MatrixVector algebra. +NB: this traits marks the fact that X belongs to the MatrixVector algebra. .. _MutableArray: @@ -130,12 +130,12 @@ MutableArray * Refines :ref:`MutableCuboidArray` -* If A is the type : +* If A is the type: * ImmutableArray == true_type * MutableArray == true_type -NB : this traits marks the fact that X belongs to the Array algebra. +NB: this traits marks the fact that X belongs to the Array algebra. .. _MutableMatrix: @@ -144,13 +144,13 @@ MutableMatrix * Refines :ref:`MutableCuboidArray` -* If A is the type : +* If A is the type: * ImmutableMatrix == true_type * MutableMatrix == true_type * A::domain_type::rank ==2 -NB : this traits marks the fact that X belongs to the MatrixVector algebra. +NB: this traits marks the fact that X belongs to the MatrixVector algebra. .. _MutableVector: @@ -159,13 +159,13 @@ MutableVector * Refines :ref:`MutableCuboidArray` -* If A is the type : +* If A is the type: * ImmutableMatrix == true_type * MutableMatrix == true_type * A::domain_type::rank ==1 -NB : this traits marks the fact that X belongs to the MatrixVector algebra. +NB: this traits marks the fact that X belongs to the MatrixVector algebra. Why concepts ? [Advanced] diff --git a/doc/reference/c++/arrays/concepts_0.cpp b/doc/reference/arrays/concepts_0.cpp similarity index 100% rename from doc/reference/c++/arrays/concepts_0.cpp rename to doc/reference/arrays/concepts_0.cpp diff --git a/doc/reference/c++/arrays/containers/CMakeLists.txt b/doc/reference/arrays/containers/CMakeLists.txt similarity index 100% rename from doc/reference/c++/arrays/containers/CMakeLists.txt rename to doc/reference/arrays/containers/CMakeLists.txt diff --git a/doc/reference/c++/arrays/containers/STL.rst b/doc/reference/arrays/containers/STL.rst similarity index 71% rename from doc/reference/c++/arrays/containers/STL.rst rename to doc/reference/arrays/containers/STL.rst index b0a8b9ae..175b14eb 100644 --- a/doc/reference/c++/arrays/containers/STL.rst +++ b/doc/reference/arrays/containers/STL.rst @@ -10,8 +10,8 @@ Standard iterators are provided that model the boost Mutable_ForwardIterator and The iterator implements also two additional methods : -* it can be casted to a bool : it is true iif the iteration is not at end. -* it.indices() : returns const & to the indices at the point of the iteration. +* it can be casted to a bool: it is true iif the iteration is not at end. +* it.indices(): returns const & to the indices at the point of the iteration. Examples:: @@ -19,7 +19,7 @@ Examples:: for (auto it = A.begin(); it; ++it) *it =it.indices()[0] + 10 *it.indices()[1]; -Some examples of usage : +Some examples of usage: .. triqs_example:: ./STL_0.cpp diff --git a/doc/reference/c++/arrays/containers/STL_0.cpp b/doc/reference/arrays/containers/STL_0.cpp similarity index 100% rename from doc/reference/c++/arrays/containers/STL_0.cpp rename to doc/reference/arrays/containers/STL_0.cpp diff --git a/doc/reference/c++/arrays/containers/call.rst b/doc/reference/arrays/containers/call.rst similarity index 91% rename from doc/reference/c++/arrays/containers/call.rst rename to doc/reference/arrays/containers/call.rst index e4ffebd3..1543e8b7 100644 --- a/doc/reference/c++/arrays/containers/call.rst +++ b/doc/reference/arrays/containers/call.rst @@ -55,12 +55,12 @@ the return type is a (partial) view of the container. The special case (2a) (no argument) returns a complete view of the object (equivalent to view_type(* this)). -The return type of the () operator is : +The return type of the () operator is: * Partial views of array or array_view return a array_view. * Partial views of vector or vector_view return a vector_view. * 2d partial views of matrix or matrix_view return a matrix_view. - * BUT : (1d) partial view of matrix or matrix_view return a vector_view. + * BUT: (1d) partial view of matrix or matrix_view return a vector_view. Example @@ -80,17 +80,17 @@ Example ------------------------------------------------- -* The containers and their views can be used with the triqs::clef library : +* The containers and their views can be used with the triqs::clef library: -* Using the clef library offers a quick and efficient way to fill an array with multiple advantages : +* Using the clef library offers a quick and efficient way to fill an array with multiple advantages: * It is simpler and more readeable than a series of for loops. * It is usually more optimal since the for loops are automatically written in the TraversalOrder of the array. -* NB : the expression can be (and are) inlined by the compilers... +* NB: the expression can be (and are) inlined by the compilers... -* **Example** : +* **Example**: .. triqs_example:: ./call_2.cpp .. note:: diff --git a/doc/reference/c++/arrays/containers/call_0.cpp b/doc/reference/arrays/containers/call_0.cpp similarity index 100% rename from doc/reference/c++/arrays/containers/call_0.cpp rename to doc/reference/arrays/containers/call_0.cpp diff --git a/doc/reference/c++/arrays/containers/call_1.cpp b/doc/reference/arrays/containers/call_1.cpp similarity index 100% rename from doc/reference/c++/arrays/containers/call_1.cpp rename to doc/reference/arrays/containers/call_1.cpp diff --git a/doc/reference/c++/arrays/containers/call_2.cpp b/doc/reference/arrays/containers/call_2.cpp similarity index 100% rename from doc/reference/c++/arrays/containers/call_2.cpp rename to doc/reference/arrays/containers/call_2.cpp diff --git a/doc/reference/c++/arrays/containers/compound_ops.rst b/doc/reference/arrays/containers/compound_ops.rst similarity index 85% rename from doc/reference/c++/arrays/containers/compound_ops.rst rename to doc/reference/arrays/containers/compound_ops.rst index a254265f..1aa21795 100644 --- a/doc/reference/c++/arrays/containers/compound_ops.rst +++ b/doc/reference/arrays/containers/compound_ops.rst @@ -14,5 +14,5 @@ Compound assignment operators (+=, -=, * =, /=) The containers and the view have compound operators. -*NB* : These operators make no sense for const views, and result in a compile error. +*NB*: These operators make no sense for const views, and result in a compile error. diff --git a/doc/reference/c++/arrays/containers/memory.rst b/doc/reference/arrays/containers/memory.rst similarity index 100% rename from doc/reference/c++/arrays/containers/memory.rst rename to doc/reference/arrays/containers/memory.rst diff --git a/doc/reference/c++/arrays/containers/range_ell.rst b/doc/reference/arrays/containers/range_ell.rst similarity index 68% rename from doc/reference/c++/arrays/containers/range_ell.rst rename to doc/reference/arrays/containers/range_ell.rst index ab5beefd..4777b78d 100644 --- a/doc/reference/c++/arrays/containers/range_ell.rst +++ b/doc/reference/arrays/containers/range_ell.rst @@ -5,9 +5,9 @@ range ========= - `range` mimics the Python `range`. Arguments of the constructor can be : + `range` mimics the Python `range`. Arguments of the constructor can be: - * no argument : it then takes the whole set of indices in the dimension (like `:` in python) :: + * no argument: it then takes the whole set of indices in the dimension (like `:` in python) :: A(range(), 0) // take the first column of A @@ -16,9 +16,9 @@ range A(range (0,3), 0) // means A(0,0), A(1,0), A(2,0) .. warning:: - the second element is excluded : range(0,3) is 0,1,2, like in Python. + the second element is excluded: range(0,3) is 0,1,2, like in Python. - * three arguments : a range with a step :: + * three arguments : a range with a step :: A(range(0,4,2), 0) // means A(0,0), A(2,0) @@ -34,9 +34,9 @@ ellipsis * Example: .. triqs_example:: ./range_ell_0.cpp -* NB : there can be at most one ellipsis per expression (otherwise it would be meaningless). +* NB: there can be at most one ellipsis per expression (otherwise it would be meaningless). -* Example of usage : +* Example of usage: Ellipsis are useful to write generic algorithms. For example, imagine that you want to sum arrays on their first index : diff --git a/doc/reference/c++/arrays/containers/range_ell_0.cpp b/doc/reference/arrays/containers/range_ell_0.cpp similarity index 100% rename from doc/reference/c++/arrays/containers/range_ell_0.cpp rename to doc/reference/arrays/containers/range_ell_0.cpp diff --git a/doc/reference/c++/arrays/containers/range_ell_1.cpp b/doc/reference/arrays/containers/range_ell_1.cpp similarity index 100% rename from doc/reference/c++/arrays/containers/range_ell_1.cpp rename to doc/reference/arrays/containers/range_ell_1.cpp diff --git a/doc/reference/c++/arrays/containers/rebind.rst b/doc/reference/arrays/containers/rebind.rst similarity index 97% rename from doc/reference/c++/arrays/containers/rebind.rst rename to doc/reference/arrays/containers/rebind.rst index aeb81e66..62efec78 100644 --- a/doc/reference/c++/arrays/containers/rebind.rst +++ b/doc/reference/arrays/containers/rebind.rst @@ -14,7 +14,7 @@ rebind .. cpp:function:: void rebind(array_view const & a) .. cpp:function:: void rebind(array_const_view const & a) -* **Effect** : +* **Effect**: Rebinds the view diff --git a/doc/reference/c++/arrays/containers/reg_assign.rst b/doc/reference/arrays/containers/reg_assign.rst similarity index 88% rename from doc/reference/c++/arrays/containers/reg_assign.rst rename to doc/reference/arrays/containers/reg_assign.rst index c6a55fca..a7ae1885 100644 --- a/doc/reference/c++/arrays/containers/reg_assign.rst +++ b/doc/reference/arrays/containers/reg_assign.rst @@ -20,10 +20,10 @@ We will illustrate it on the `array` class, it is the same for `matrix` and `vec * (2) **RHS** can be anything that models the :ref:`ImmutableCuboidArray` concept - e.g. : array, array_view, matrix, matrix_view, + e.g.: array, array_view, matrix, matrix_view, but also formal expression (See , e.g. A+B), or any custom object of your choice. - `Effect` : all the elements viewed by the view are replaced + `Effect`: all the elements viewed by the view are replaced by the evaluation of RHS. .. warning:: diff --git a/doc/reference/c++/arrays/containers/reg_constructors.rst b/doc/reference/arrays/containers/reg_constructors.rst similarity index 100% rename from doc/reference/c++/arrays/containers/reg_constructors.rst rename to doc/reference/arrays/containers/reg_constructors.rst diff --git a/doc/reference/c++/arrays/containers/reg_constructors_0.cpp b/doc/reference/arrays/containers/reg_constructors_0.cpp similarity index 100% rename from doc/reference/c++/arrays/containers/reg_constructors_0.cpp rename to doc/reference/arrays/containers/reg_constructors_0.cpp diff --git a/doc/reference/c++/arrays/containers/regular.rst b/doc/reference/arrays/containers/regular.rst similarity index 94% rename from doc/reference/c++/arrays/containers/regular.rst rename to doc/reference/arrays/containers/regular.rst index 072bdbba..5ee575c9 100644 --- a/doc/reference/c++/arrays/containers/regular.rst +++ b/doc/reference/arrays/containers/regular.rst @@ -18,13 +18,13 @@ where triqs::ull_t is the type defined by : typedef unsigned long long ull_t; -* The library provides three basic containers : +* The library provides three basic containers: - * array : general (rectangular) `N`-dimensionnal array; models :ref:`MutableCuboidArray` concept. - * matrix : models the :ref:`MutableMatrix` concept. - * vector : models the :ref:`MutableVector` concept. + * array: general (rectangular) `N`-dimensionnal array; models :ref:`MutableCuboidArray` concept. + * matrix: models the :ref:`MutableMatrix` concept. + * vector: models the :ref:`MutableVector` concept. - and the corresponding view classes : array_view, matrix_view, vector_view (Cf :ref:`partial_views`). + and the corresponding view classes: array_view, matrix_view, vector_view (Cf :ref:`partial_views`). * The matrix and vector are very similar to an array of dimension 2 and 1 respectivily, except for their algebra. Array form an array algebra, where operation are done element-wise, while matrix and vector diff --git a/doc/reference/c++/arrays/containers/resize.rst b/doc/reference/arrays/containers/resize.rst similarity index 77% rename from doc/reference/c++/arrays/containers/resize.rst rename to doc/reference/arrays/containers/resize.rst index 0cd8b651..069527b7 100644 --- a/doc/reference/c++/arrays/containers/resize.rst +++ b/doc/reference/arrays/containers/resize.rst @@ -27,7 +27,7 @@ resize As for std::vector, resize invalidate all pointers to the data of the container (they may move in memory, to maintain data contiguity). - Views are invalidated too : more precisely, because of the memory guarantee provided by the views, + Views are invalidated too: more precisely, because of the memory guarantee provided by the views, the view is still valid (code will not crash), but it does *not* view the container anymore... Illustration : @@ -42,5 +42,5 @@ resize_or_check_if_view .. cpp:function:: void resize_or_check_if_view(ArrayType const & A, shape_t) -* If A is a value : resize A -* If A is a view : check that the shape if the shape_t and throw an exception if not. +* If A is a value: resize A +* If A is a view: check that the shape if the shape_t and throw an exception if not. diff --git a/doc/reference/c++/arrays/containers/resize_0.cpp b/doc/reference/arrays/containers/resize_0.cpp similarity index 100% rename from doc/reference/c++/arrays/containers/resize_0.cpp rename to doc/reference/arrays/containers/resize_0.cpp diff --git a/doc/reference/c++/arrays/containers/resize_1.cpp b/doc/reference/arrays/containers/resize_1.cpp similarity index 100% rename from doc/reference/c++/arrays/containers/resize_1.cpp rename to doc/reference/arrays/containers/resize_1.cpp diff --git a/doc/reference/c++/arrays/containers/stream.rst b/doc/reference/arrays/containers/stream.rst similarity index 100% rename from doc/reference/c++/arrays/containers/stream.rst rename to doc/reference/arrays/containers/stream.rst diff --git a/doc/reference/c++/arrays/containers/swap.rst b/doc/reference/arrays/containers/swap.rst similarity index 93% rename from doc/reference/c++/arrays/containers/swap.rst rename to doc/reference/arrays/containers/swap.rst index 749e71a5..4aa85f75 100644 --- a/doc/reference/c++/arrays/containers/swap.rst +++ b/doc/reference/arrays/containers/swap.rst @@ -2,7 +2,7 @@ swap & deep_swap ================================== -There are two possible interpretation of "swapping two arrays" : +There are two possible interpretation of "swapping two arrays": either use 3 moves like std::swap, i.e. swapping the pointer to the data in memory, or making a deep swap, i.e. really swapping all the elements in memeory. diff --git a/doc/reference/c++/arrays/containers/swap_0.cpp b/doc/reference/arrays/containers/swap_0.cpp similarity index 100% rename from doc/reference/c++/arrays/containers/swap_0.cpp rename to doc/reference/arrays/containers/swap_0.cpp diff --git a/doc/reference/c++/arrays/containers/swap_1.cpp b/doc/reference/arrays/containers/swap_1.cpp similarity index 100% rename from doc/reference/c++/arrays/containers/swap_1.cpp rename to doc/reference/arrays/containers/swap_1.cpp diff --git a/doc/reference/c++/arrays/containers/template_parameters.rst b/doc/reference/arrays/containers/template_parameters.rst similarity index 85% rename from doc/reference/c++/arrays/containers/template_parameters.rst rename to doc/reference/arrays/containers/template_parameters.rst index 4f5dad4c..44c2cb69 100644 --- a/doc/reference/c++/arrays/containers/template_parameters.rst +++ b/doc/reference/arrays/containers/template_parameters.rst @@ -7,7 +7,7 @@ OptionFlags ---------------------------- * OptionFlags is a series of flags determining various options at compile time. - The possible flags are accessible via a constexpr ull_t in triqs::arrays or a macro : + The possible flags are accessible via a constexpr ull_t in triqs::arrays or a macro: ======================== ======================================= Macro constexpr equivalent @@ -19,9 +19,9 @@ OptionFlags ======================== ======================================= - Defaults can be modified with the macros : + Defaults can be modified with the macros: - * `TRIQS_ARRAYS_ENFORCE_BOUNDCHECK` : enforce BoundCheck by default (slows down codes ! Use only for debugging purposes). + * `TRIQS_ARRAYS_ENFORCE_BOUNDCHECK` : enforce BoundCheck by default (slows down codes ! Use only for debugging purposes). .. _arr_templ_par_to: @@ -42,7 +42,7 @@ TraversalOrder For a few very specials operations (e.g. regrouping of indices), the indices ordering in memory and TraversalOrder must coincide. This will be explicitely said below. By default, it is not necessary (but can be suboptimal). - The permutation P encodes the position of the index : P[0] is the fastest index, P[rank - 1] the slowest index + The permutation P encodes the position of the index: P[0] is the fastest index, P[rank - 1] the slowest index (see examples below). TraversalOrder is not present for vector since there is only one possibility in 1d. diff --git a/doc/reference/c++/arrays/containers/view_assign.rst b/doc/reference/arrays/containers/view_assign.rst similarity index 86% rename from doc/reference/c++/arrays/containers/view_assign.rst rename to doc/reference/arrays/containers/view_assign.rst index 14dc1d18..b2dbdf5f 100644 --- a/doc/reference/c++/arrays/containers/view_assign.rst +++ b/doc/reference/arrays/containers/view_assign.rst @@ -5,7 +5,7 @@ Assignment to views ========================= -**Synopsis** : +**Synopsis**: template array_view & operator=(RHS const & X); @@ -15,14 +15,14 @@ The `view classes` have a quite general assignment operator. We will illustrate it on the `array_view` class, it is the same for `matrix` and `vector`. -* **RHS** can be : +* **RHS** can be: * Anything that models the :ref:`ImmutableCuboidArray` concept - e.g. : array, array_view, matrix, matrix_view, + e.g.: array, array_view, matrix, matrix_view, but also formal expression (See , e.g. A+B), or any custom object of your choice. - *Effect* : + *Effect*: Every elements viewed by the view are replaced by the evaluation of RHS. *Precondition* @@ -32,16 +32,16 @@ We will illustrate it on the `array_view` class, it is the same for `matrix` and If the debug macro, :ref:`TRIQS_ARRAYS_ENFORCE_BOUNDCHECK` is defined, this condition is checked at runtime. - NB : We could lower this condition, since we don't need a domain here, just the evaluation on the indices... + NB: We could lower this condition, since we don't need a domain here, just the evaluation on the indices... * A scalar. - *Effect* : + *Effect*: Every elements viewed by the view are set to this scalar, except for the matrix_view, where the matrix is set to the identity. -NB : no move assignment operator +NB: no move assignment operator --------------------------------------- Note that **there is no move assignment operators for views**. diff --git a/doc/reference/c++/arrays/containers/view_constructors.rst b/doc/reference/arrays/containers/view_constructors.rst similarity index 100% rename from doc/reference/c++/arrays/containers/view_constructors.rst rename to doc/reference/arrays/containers/view_constructors.rst diff --git a/doc/reference/c++/arrays/containers/views.rst b/doc/reference/arrays/containers/views.rst similarity index 98% rename from doc/reference/c++/arrays/containers/views.rst rename to doc/reference/arrays/containers/views.rst index 432f0cb4..ed5dbbc2 100644 --- a/doc/reference/c++/arrays/containers/views.rst +++ b/doc/reference/arrays/containers/views.rst @@ -38,7 +38,7 @@ where triqs::ull_t is the type defined by : In particular, they never make copy of the data. See :ref:`view_vs_regular` for a detailed discussion of the difference between a regular type and its corresponding view. -* Views are largely interoperable : it is easy and quick to take a matrix_view of an array, or vice versa. +* Views are largely interoperable: it is easy and quick to take a matrix_view of an array, or vice versa. Cf constructors belows. * Const views can be constructed from a view, but the reverse is not true (Cf constructors). diff --git a/doc/reference/c++/arrays/contents.rst b/doc/reference/arrays/contents.rst similarity index 100% rename from doc/reference/c++/arrays/contents.rst rename to doc/reference/arrays/contents.rst diff --git a/doc/reference/c++/arrays/debug.rst b/doc/reference/arrays/debug.rst similarity index 94% rename from doc/reference/c++/arrays/debug.rst rename to doc/reference/arrays/debug.rst index cbe1d7a5..726081c8 100644 --- a/doc/reference/c++/arrays/debug.rst +++ b/doc/reference/arrays/debug.rst @@ -7,7 +7,7 @@ Bound checking and debug macros =================================== To be fast, by default, no check are made on the indices while accessing elements or slicing. -However, checks can be activated in two ways : +However, checks can be activated in two ways: * Adding the `BOUND_CHECK` option diff --git a/doc/reference/c++/arrays/debug_0.cpp b/doc/reference/arrays/debug_0.cpp similarity index 100% rename from doc/reference/c++/arrays/debug_0.cpp rename to doc/reference/arrays/debug_0.cpp diff --git a/doc/reference/c++/arrays/examples_h5/h5_rw.cpp b/doc/reference/arrays/examples_h5/h5_rw.cpp similarity index 100% rename from doc/reference/c++/arrays/examples_h5/h5_rw.cpp rename to doc/reference/arrays/examples_h5/h5_rw.cpp diff --git a/doc/reference/c++/arrays/examples_h5/h5_rw.output b/doc/reference/arrays/examples_h5/h5_rw.output similarity index 100% rename from doc/reference/c++/arrays/examples_h5/h5_rw.output rename to doc/reference/arrays/examples_h5/h5_rw.output diff --git a/doc/reference/c++/arrays/examples_h5/h5_stack_ex.cpp b/doc/reference/arrays/examples_h5/h5_stack_ex.cpp similarity index 100% rename from doc/reference/c++/arrays/examples_h5/h5_stack_ex.cpp rename to doc/reference/arrays/examples_h5/h5_stack_ex.cpp diff --git a/doc/reference/c++/arrays/examples_h5/h5_stack_ex.output b/doc/reference/arrays/examples_h5/h5_stack_ex.output similarity index 100% rename from doc/reference/c++/arrays/examples_h5/h5_stack_ex.output rename to doc/reference/arrays/examples_h5/h5_stack_ex.output diff --git a/doc/reference/c++/arrays/examples_h5/h5_stack_ex_sca.cpp b/doc/reference/arrays/examples_h5/h5_stack_ex_sca.cpp similarity index 100% rename from doc/reference/c++/arrays/examples_h5/h5_stack_ex_sca.cpp rename to doc/reference/arrays/examples_h5/h5_stack_ex_sca.cpp diff --git a/doc/reference/c++/arrays/examples_h5/h5_stack_ex_sca.output b/doc/reference/arrays/examples_h5/h5_stack_ex_sca.output similarity index 100% rename from doc/reference/c++/arrays/examples_h5/h5_stack_ex_sca.output rename to doc/reference/arrays/examples_h5/h5_stack_ex_sca.output diff --git a/doc/reference/c++/arrays/foreach.rst b/doc/reference/arrays/foreach.rst similarity index 97% rename from doc/reference/c++/arrays/foreach.rst rename to doc/reference/arrays/foreach.rst index 2e1c73ce..f1558dae 100644 --- a/doc/reference/c++/arrays/foreach.rst +++ b/doc/reference/arrays/foreach.rst @@ -2,7 +2,7 @@ .. _Foreach: -Loops : the foreach constructs +Loops: the foreach constructs ======================================================== foreach and its variants are a compact and efficient way to @@ -12,7 +12,7 @@ perform some action of the kind While this kind of construct is equivalent to write manually the *for* loops, it has -several advantages : +several advantages: * it is more compact, less error prone (one does not need to specify the bounds in the loop). @@ -48,7 +48,7 @@ in the order specified by the TraversalOrder flag of the array. * As a result this is always equally or more optimized than a manually written loop. -Example : +Example: .. triqs_example:: ./foreach_0.cpp .. note:: diff --git a/doc/reference/c++/arrays/foreach_0.cpp b/doc/reference/arrays/foreach_0.cpp similarity index 100% rename from doc/reference/c++/arrays/foreach_0.cpp rename to doc/reference/arrays/foreach_0.cpp diff --git a/doc/reference/c++/arrays/foreach_1.cpp b/doc/reference/arrays/foreach_1.cpp similarity index 100% rename from doc/reference/c++/arrays/foreach_1.cpp rename to doc/reference/arrays/foreach_1.cpp diff --git a/doc/reference/c++/arrays/group_indices.rst b/doc/reference/arrays/group_indices.rst similarity index 92% rename from doc/reference/c++/arrays/group_indices.rst rename to doc/reference/arrays/group_indices.rst index 64d9d699..bc65082b 100644 --- a/doc/reference/c++/arrays/group_indices.rst +++ b/doc/reference/arrays/group_indices.rst @@ -10,4 +10,4 @@ Grouping indices * **Syntax** : -* **Example** : +* **Example**: diff --git a/doc/reference/c++/arrays/h5_complex.rst b/doc/reference/arrays/h5_complex.rst similarity index 100% rename from doc/reference/c++/arrays/h5_complex.rst rename to doc/reference/arrays/h5_complex.rst diff --git a/doc/reference/c++/arrays/h5_proxy.rst b/doc/reference/arrays/h5_proxy.rst similarity index 93% rename from doc/reference/c++/arrays/h5_proxy.rst rename to doc/reference/arrays/h5_proxy.rst index b43888de..58781e9d 100644 --- a/doc/reference/c++/arrays/h5_proxy.rst +++ b/doc/reference/arrays/h5_proxy.rst @@ -1,11 +1,11 @@ .. highlight:: c -h5::array_proxy : a simple proxy to the array in file +h5::array_proxy: a simple proxy to the array in file =========================================================== .. warning:: - NOT operational any more ... : development needed + NOT operational any more ... : development needed The principle is that `array_proxy` is a proxy to an array, possibly big, in the h5 file. It has a domain, and can be assigned from/to an array and sliced. diff --git a/doc/reference/c++/arrays/h5_rw.rst b/doc/reference/arrays/h5_rw.rst similarity index 92% rename from doc/reference/c++/arrays/h5_rw.rst rename to doc/reference/arrays/h5_rw.rst index 428cd697..521f38e4 100644 --- a/doc/reference/c++/arrays/h5_rw.rst +++ b/doc/reference/arrays/h5_rw.rst @@ -4,12 +4,12 @@ Simple read/write operations of an array (or a view) ============================================================================ Given an array (or an array_view), the functions `h5::write` and `h5::read` write and read it to/from the file -or any subgroup thereof. For example : +or any subgroup thereof. For example: .. triqs_example:: ./h5_rw_0.cpp .. triqs_example:: examples_code/h5_rw.cpp -Note that : +Note that: * The data in the hdf5 file are stored in C order. diff --git a/doc/reference/c++/arrays/h5_rw_0.cpp b/doc/reference/arrays/h5_rw_0.cpp similarity index 100% rename from doc/reference/c++/arrays/h5_rw_0.cpp rename to doc/reference/arrays/h5_rw_0.cpp diff --git a/doc/reference/c++/arrays/h5_stack.rst b/doc/reference/arrays/h5_stack.rst similarity index 91% rename from doc/reference/c++/arrays/h5_stack.rst rename to doc/reference/arrays/h5_stack.rst index b2cec4cf..7f68a7e3 100644 --- a/doc/reference/c++/arrays/h5_stack.rst +++ b/doc/reference/arrays/h5_stack.rst @@ -1,6 +1,6 @@ .. highlight:: c -h5::array_stack : stacking arrays or scalars +h5::array_stack: stacking arrays or scalars ================================================================ h5::array_stack writes a sequences of arrays of the same shape (or of scalars) into an hdf5 array with one more dimension, unlimited in the stacking direction. @@ -11,7 +11,7 @@ It is typically used to store a Monte-Carlo data series for later analysis. * If the base of the stack is a simple number (double, int, ...), R=0. -* The syntax is simple : +* The syntax is simple: * The << operator piles up an array/scalar onto the stack. * The ++ operator advances by one slice in the stack. @@ -19,7 +19,7 @@ It is typically used to store a Monte-Carlo data series for later analysis. * The stack is bufferized in memory (`bufsize` parameter), so that the file access does not happen too often. -* NB : beware to complex numbers ---> REF TO COMPLEX +* NB: beware to complex numbers ---> REF TO COMPLEX Reference ------------ diff --git a/doc/reference/c++/arrays/implementation_notes/assignment.rst b/doc/reference/arrays/implementation_notes/assignment.rst similarity index 100% rename from doc/reference/c++/arrays/implementation_notes/assignment.rst rename to doc/reference/arrays/implementation_notes/assignment.rst diff --git a/doc/reference/c++/arrays/implementation_notes/concepts.rst b/doc/reference/arrays/implementation_notes/concepts.rst similarity index 92% rename from doc/reference/c++/arrays/implementation_notes/concepts.rst rename to doc/reference/arrays/implementation_notes/concepts.rst index b3b14b90..6deca8d2 100644 --- a/doc/reference/c++/arrays/implementation_notes/concepts.rst +++ b/doc/reference/arrays/implementation_notes/concepts.rst @@ -21,9 +21,9 @@ Printable Domain ------------------------------------------------- -* **Purpose** : The domain of definition of the array, i.e. the possible value of the indices. -* **Refines** : BoostSerializable, Printable -* **Definition** : +* **Purpose** : The domain of definition of the array, i.e. the possible value of the indices. +* **Refines**: BoostSerializable, Printable +* **Definition**: +------------------------------------------------------------------+-------------------------------------------------------+ | Elements | Comment | @@ -49,7 +49,7 @@ Domain Typically, this is is a multi-index for an array, matrix, ...., e.g. - * Cuboid : standard hyperrectangular arrays. This is little more than the tuple of the lengths. + * Cuboid: standard hyperrectangular arrays. This is little more than the tuple of the lengths. * triangle, .... ? .. _HasImmutableArrayInterface: @@ -57,12 +57,12 @@ Domain HasImmutableArrayInterface ------------------------------------------------- -* **Purpose** : The most abstract definition of something that behaves like an immutable array. +* **Purpose**: The most abstract definition of something that behaves like an immutable array. * it has a domain (hence a rank). * it can be evaluated on any value of the indices in the domain * By combining the generator of the domain with the evaluation, it is therefore easy to iterate on the values of such an object. - * NB : It does not need to be stored in memory. A formal expression, e.g. model this concept. + * NB: It does not need to be stored in memory. A formal expression, e.g. model this concept. * **Definition** ([A|B] denotes that the return type maybe A or B). @@ -75,15 +75,15 @@ HasImmutableArrayInterface [ value_type | value_type const &] operator[] (domain_type::index_value_type const &) const Evaluation. ================================================================================================== ============================================================= -* **Examples** : +* **Examples**: * array, array_view, matrix, matrix_view, vector, vector_view (all implemented as Indexmap_Storage_Pair) * array expressions (in which case the returns are not const & since they are computed, not stored). IndexGenerator ------------------------------------------------- -* **Purpose** : Generate the indices of a domain. +* **Purpose**: Generate the indices of a domain. -* **Definition** : +* **Definition**: ============================================================== ================================================================================================== Elements Comment @@ -107,13 +107,13 @@ IndexGenerator IndexMap ------------------------------------------------- -* **Purpose** : +* **Purpose**: * Store the mapping of the index domain to a linear array. - * It is basically a function : indices --> 1d position, the bijection between the indices + * It is basically a function: indices --> 1d position, the bijection between the indices of an element and its position in the memory block. -* **Refines** : BoostSerializable, Printable -* **Definition** : +* **Refines**: BoostSerializable, Printable +* **Definition**: ======================================================================== ================================================================================================== Elements Comment @@ -124,12 +124,12 @@ IndexMap * can be constructed from domain_type const & * size_t operator[] (domain_type::index_value_type const & key ) const The mapping itself. * iterator A type modeling IndexMapIterator, which is the optimal memory traversal. - NB : the order of indices is chosen for optimal traversal of memory, it + NB: the order of indices is chosen for optimal traversal of memory, it does not need to be "natural". cuboid_map also provides a natural_iterator for that purpose. ======================================================================== ================================================================================================== -* The type also has to define two free functions and to specialize a template : +* The type also has to define two free functions and to specialize a template: ========================================================== ================================================================================================== Elements Comment @@ -138,31 +138,31 @@ IndexMap map M2 * bool raw_copy_possible (M1, M2) Is the assignment of an array/matrix/vector with map M2 into an array/matrix/vector with map M1 doable with raw copy - * struct indexmap_iterator_adapter< It, I > Metafunction : + * struct indexmap_iterator_adapter< It, I > Metafunction: - I is the IndexMap class - It any similar IndexMapIterator which returns (in ::type) the IndexMapIterator on I with the same order traversal as It. - Example : It is a IndexMapIterator on I1 stored in C order, I is in Fortran order, + Example: It is a IndexMapIterator on I1 stored in C order, I is in Fortran order, the result will be an IndexMapIterator on I that presents the data of I in C order This is used in copying array with different indexmaps. ========================================================== ================================================================================================== -* **Examples** : - * cuboid_map : a map of the cuboid indices in a fixed order in memory. +* **Examples**: + * cuboid_map : a map of the cuboid indices in a fixed order in memory. IndexMapIterator ------------------------------------------------- -* **Purpose** : +* **Purpose**: * A basic iterator on an IndexMap which can be dereferenced into the shift of successive elements compared to the start of the memory block. * These iterators are kept as simple as possible, so that it is easy to implement new indices maps and their iterators. - * NB : In particular, they are *not* necessary STL-compliant. The array_iterator class will + * NB: In particular, they are *not* necessary STL-compliant. The array_iterator class will take such an iterator and a Storage and produce a true, STL compliant iterator on the array (iterator_adapter). -* **Definition** : +* **Definition**: ========================================================== ================================================================================================== Elements Comment @@ -186,13 +186,13 @@ IndexMapIterator Storage ------------------------------------------------- -* **Purpose** : +* **Purpose**: * The storage of the array in memory, e.g. plain C++ array, a numpy, etc... * A Storage keeps the reference to the memory block where the array is stored. - * NB : This memory block can be typically shared between various arrays and views, + * NB: This memory block can be typically shared between various arrays and views, so the Storage is just a reference. The memory is deallocated only when all storages referencing it has been destroyed. -* **Refines** : BoostSerializable +* **Refines**: BoostSerializable * **Definition** : ====================================================== ================================================================================================== @@ -227,7 +227,7 @@ StorageOrder concept * Store the order of indices in memory. * Can be fixed at compile time, or dynamically (not implemented). -* **Refines** : BoostSerializable +* **Refines**: BoostSerializable * **Definition** : ====================================================== ================================================================================================== @@ -243,7 +243,7 @@ StorageOrder concept ====================================================== ================================================================================================== -* The type also has to define the == operator : +* The type also has to define the == operator: ========================================================== ================================================================================================== Elements Comment diff --git a/doc/reference/c++/arrays/implementation_notes/contents.rst b/doc/reference/arrays/implementation_notes/contents.rst similarity index 100% rename from doc/reference/c++/arrays/implementation_notes/contents.rst rename to doc/reference/arrays/implementation_notes/contents.rst diff --git a/doc/reference/c++/arrays/implementation_notes/cuboid_formula.rst b/doc/reference/arrays/implementation_notes/cuboid_formula.rst similarity index 77% rename from doc/reference/c++/arrays/implementation_notes/cuboid_formula.rst rename to doc/reference/arrays/implementation_notes/cuboid_formula.rst index e2185c11..f80c5d9e 100644 --- a/doc/reference/c++/arrays/implementation_notes/cuboid_formula.rst +++ b/doc/reference/arrays/implementation_notes/cuboid_formula.rst @@ -7,12 +7,12 @@ Cuboid formula * **Notations** : * R = rank - * index : (i0,...,i_{R-1}) - * Lengths : (L0, ... , L_{R-1}) - * Strides : (S0, ... , S_{R-1}) + * index: (i0,...,i_{R-1}) + * Lengths: (L0, ... , L_{R-1}) + * Strides: (S0, ... , S_{R-1}) * position = start_shift + \sum_{j=0}^{R-1} i_j S_j -* **Strides for compact cuboid** : +* **Strides for compact cuboid**: If :math:`\sigma(i)` is the i-th index in memory (0 the first, R-1 the last one), we have @@ -26,14 +26,14 @@ Cuboid formula \end{align*} -* **Slicing the cuboid** : +* **Slicing the cuboid**: - * Argument of the slice : (R0, R1, ..., R_{R-1}), with R_i = range : (start,end,step) + * Argument of the slice: (R0, R1, ..., R_{R-1}), with R_i = range: (start,end,step) for the moment, if R_i = E_i, a number, consider it as a special range of length 1. * new index (k0,...., k_{R-1}). i_u = R_u.start + k_u * R_u.step - * Compute the new strides : Sn_j + * Compute the new strides: Sn_j .. math:: :nowrap: @@ -49,7 +49,7 @@ Cuboid formula Sn_j &= S_j * R_j.start \end{align*} - * Now : for the cases R_i = E_i, just drop the index. + * Now: for the cases R_i = E_i, just drop the index. diff --git a/doc/reference/c++/arrays/implementation_notes/expression_template.rst b/doc/reference/arrays/implementation_notes/expression_template.rst similarity index 100% rename from doc/reference/c++/arrays/implementation_notes/expression_template.rst rename to doc/reference/arrays/implementation_notes/expression_template.rst diff --git a/doc/reference/c++/arrays/implementation_notes/functional.rst b/doc/reference/arrays/implementation_notes/functional.rst similarity index 66% rename from doc/reference/c++/arrays/implementation_notes/functional.rst rename to doc/reference/arrays/implementation_notes/functional.rst index 41427c8a..e5373d42 100644 --- a/doc/reference/c++/arrays/implementation_notes/functional.rst +++ b/doc/reference/arrays/implementation_notes/functional.rst @@ -1,6 +1,6 @@ .. _impl_func: -Functional aspect : fold, map, mapped functions +Functional aspect: fold, map, mapped functions ============================================================= map and fold diff --git a/doc/reference/c++/arrays/implementation_notes/hdf5.rst b/doc/reference/arrays/implementation_notes/hdf5.rst similarity index 100% rename from doc/reference/c++/arrays/implementation_notes/hdf5.rst rename to doc/reference/arrays/implementation_notes/hdf5.rst diff --git a/doc/reference/c++/arrays/implementation_notes/indexmaps.rst b/doc/reference/arrays/implementation_notes/indexmaps.rst similarity index 88% rename from doc/reference/c++/arrays/implementation_notes/indexmaps.rst rename to doc/reference/arrays/implementation_notes/indexmaps.rst index bca02028..4aa4235b 100644 --- a/doc/reference/c++/arrays/implementation_notes/indexmaps.rst +++ b/doc/reference/arrays/implementation_notes/indexmaps.rst @@ -9,7 +9,7 @@ Concepts ---------- -Implementation : cuboid map +Implementation: cuboid map ---------------------------- * domain with foreach diff --git a/doc/reference/c++/arrays/implementation_notes/isp.rst b/doc/reference/arrays/implementation_notes/isp.rst similarity index 70% rename from doc/reference/c++/arrays/implementation_notes/isp.rst rename to doc/reference/arrays/implementation_notes/isp.rst index dbff7dd6..6fc19859 100644 --- a/doc/reference/c++/arrays/implementation_notes/isp.rst +++ b/doc/reference/arrays/implementation_notes/isp.rst @@ -4,7 +4,7 @@ IndexmapStoragePair implementation class ============================================================= -* goal : a generic implementation of the container, view or not. +* goal: a generic implementation of the container, view or not. * lazy description * rvalue ref ! diff --git a/doc/reference/c++/arrays/implementation_notes/linalg.rst b/doc/reference/arrays/implementation_notes/linalg.rst similarity index 100% rename from doc/reference/c++/arrays/implementation_notes/linalg.rst rename to doc/reference/arrays/implementation_notes/linalg.rst diff --git a/doc/reference/c++/arrays/implementation_notes/python.rst b/doc/reference/arrays/implementation_notes/python.rst similarity index 53% rename from doc/reference/c++/arrays/implementation_notes/python.rst rename to doc/reference/arrays/implementation_notes/python.rst index 66887f1d..e1cefbe0 100644 --- a/doc/reference/c++/arrays/implementation_notes/python.rst +++ b/doc/reference/arrays/implementation_notes/python.rst @@ -3,9 +3,9 @@ Interface to python ============================================================= -Files : +Files: -Low level : memory guarantee +Low level: memory guarantee -High level : 2 functions for going back and forth. +High level: 2 functions for going back and forth. diff --git a/doc/reference/c++/arrays/implementation_notes/reinterpretation.rst b/doc/reference/arrays/implementation_notes/reinterpretation.rst similarity index 100% rename from doc/reference/c++/arrays/implementation_notes/reinterpretation.rst rename to doc/reference/arrays/implementation_notes/reinterpretation.rst diff --git a/doc/reference/c++/arrays/implementation_notes/slicing.rst b/doc/reference/arrays/implementation_notes/slicing.rst similarity index 73% rename from doc/reference/c++/arrays/implementation_notes/slicing.rst rename to doc/reference/arrays/implementation_notes/slicing.rst index d41a4b93..336c67e7 100644 --- a/doc/reference/c++/arrays/implementation_notes/slicing.rst +++ b/doc/reference/arrays/implementation_notes/slicing.rst @@ -11,27 +11,27 @@ In this section, IM denotes some IndexMaps. * It is a meta-function that computes the type of the resulting indexmap * It is a function that computes the resulting indexmap. -* The array/matrix/vector classes and their views, when called with the () operator, will : +* The array/matrix/vector classes and their views, when called with the () operator, will: * forward all the arguments and their types to IndexMaps::slice, to compute the new indexmap IM2. * If IM2 is of dimension 0, return a value_type & or const & (it is a simple number, not an array). - * Otherwise : return a new view, made of IM2 and the same data as for the original object. + * Otherwise: return a new view, made of IM2 and the same data as for the original object. * Possible slices are defined by the IndexMap type. Slicing an class C with IndexMap I1 produces a class C2_view, with IndexMap I2, i.e. a new sliced IndexMap on the same data. -* **Examples** : - * array and array_view can be sliced : +* **Examples**: + * array and array_view can be sliced: `` - array A(10,10); : defines an array - A(1,2) : element access. - A ( 1, range(0,2) ) : 1d slice - A( range(0,10,2), range(0,10,2)) : a 2d slice viewing every each elements with even coordinates. + array A(10,10); : defines an array + A(1,2) : element access. + A ( 1, range(0,2) ) : 1d slice + A( range(0,10,2), range(0,10,2)) : a 2d slice viewing every each elements with even coordinates. `` * matrix, matrix_view when sliced, return vector_view or matrix_view. -* One can be much more general : e.g. slicing the diagonal of a matrix, etc... +* One can be much more general: e.g. slicing the diagonal of a matrix, etc... @@ -45,7 +45,7 @@ In this section, IM denotes some IndexMaps. template struct slice< IM, ArgsTuple> { typedef IM2 type; }; - //In namespace IndexMaps : + //In namespace IndexMaps: template typename result_of::slice::type slice(IM const &, ArgsTuple args); diff --git a/doc/reference/c++/arrays/implementation_notes/storage.rst b/doc/reference/arrays/implementation_notes/storage.rst similarity index 89% rename from doc/reference/c++/arrays/implementation_notes/storage.rst rename to doc/reference/arrays/implementation_notes/storage.rst index 324df042..25dd044d 100644 --- a/doc/reference/c++/arrays/implementation_notes/storage.rst +++ b/doc/reference/arrays/implementation_notes/storage.rst @@ -9,7 +9,7 @@ Concept The storage concept... -Implementation : shared_block +Implementation: shared_block ------------------------------ diff --git a/doc/reference/c++/arrays/implementation_notes/strategy.rst b/doc/reference/arrays/implementation_notes/strategy.rst similarity index 69% rename from doc/reference/c++/arrays/implementation_notes/strategy.rst rename to doc/reference/arrays/implementation_notes/strategy.rst index d985e716..687a11ee 100644 --- a/doc/reference/c++/arrays/implementation_notes/strategy.rst +++ b/doc/reference/arrays/implementation_notes/strategy.rst @@ -24,39 +24,39 @@ and a physical storage S in the computer (a block of memory), denoted as an Inde * a C++ shared pointer to a memory block. * a reference to a numpy array. -This design has several consequences : +This design has several consequences: -* **Interoperability** : classes are widely interoperable, e.g. one can add a array and a matrix (if dimensions are ok of course). +* **Interoperability**: classes are widely interoperable, e.g. one can add a array and a matrix (if dimensions are ok of course). one can also add a python numpy and a C++ array without any further coding. * It is straighforward to construct a matrix_view from an array, since it is the same couple , just interpreted differently. -* It is easy to view a array as a matrix by gathering indices (properly ordered in memory) : +* It is easy to view a array as a matrix by gathering indices (properly ordered in memory): one just has to provide a new IndexMap I2 to see the same data. [ --> very useful for vertex computation in many body...] -* Slicing, or partial view is very natural : it is just a function on indexmaps : I--> I2, +* Slicing, or partial view is very natural: it is just a function on indexmaps: I--> I2, independantly of any storage. Quick guide through the implementation ============================================================= -The implementation is divided into basically 4 parts : +The implementation is divided into basically 4 parts: -* Storages : implements two storages shared_block and numpy +* Storages: implements two storages shared_block and numpy -* IndexMaps : implements cuboid index map, its domain and iterators +* IndexMaps: implements cuboid index map, its domain and iterators -* impl/indexmap_storage_pair.hpp : the basic implementation class for all user class. +* impl/indexmap_storage_pair.hpp: the basic implementation class for all user class. It is basically just a couple of an indexmap and a storage, with shallow copy. It also forward the slices to the indexmap and construct the correct views. -* upper level : - * user class : array, array_view, matrix, matrix_view, vector, vector_view - * expression.hpp : boost proto expression - * numpy_interface.hpp : helper to get numpy into array +* upper level: + * user class: array, array_view, matrix, matrix_view, vector, vector_view + * expression.hpp: boost proto expression + * numpy_interface.hpp: helper to get numpy into array * lapack/blas interface * hdf5 support. diff --git a/doc/reference/c++/arrays/implementation_notes/userclasses.rst b/doc/reference/arrays/implementation_notes/userclasses.rst similarity index 80% rename from doc/reference/c++/arrays/implementation_notes/userclasses.rst rename to doc/reference/arrays/implementation_notes/userclasses.rst index fafbdd75..b0730955 100644 --- a/doc/reference/c++/arrays/implementation_notes/userclasses.rst +++ b/doc/reference/arrays/implementation_notes/userclasses.rst @@ -1,7 +1,7 @@ .. _impl_userclasses: -User classes : array, matrix, vector +User classes: array, matrix, vector ============================================================= * view and not diff --git a/doc/reference/c++/arrays/introduction.rst b/doc/reference/arrays/introduction.rst similarity index 83% rename from doc/reference/c++/arrays/introduction.rst rename to doc/reference/arrays/introduction.rst index 093ea2fb..a5360d6a 100644 --- a/doc/reference/c++/arrays/introduction.rst +++ b/doc/reference/arrays/introduction.rst @@ -5,7 +5,7 @@ Rational This library provides a multi-dimensionnal array library -for numerical computations with the following characteristics/goals : +for numerical computations with the following characteristics/goals: * **Simplicity of use** : @@ -14,7 +14,7 @@ for numerical computations with the following characteristics/goals : programmers. We do *a lot* of array manipulations, and we want to maintain *readable* codes. -* **Genericity, abstraction and performance** : +* **Genericity, abstraction and performance**: We want to have simple, readeable code, with the same (or better) speed than manually written low-level code. Most optimisations should be delegated to the library and the compiler. @@ -29,9 +29,9 @@ for numerical computations with the following characteristics/goals : * create a array in C++, and return it as a numpy. * mix the various kind of arrays transparently in C++ expressions. -* **HDF5** : simple interface to hdf5 library to ease storing/retrieving into/from HDF5 files. +* **HDF5**: simple interface to hdf5 library to ease storing/retrieving into/from HDF5 files. -* **MPI** : compatibility with boost::mpi interface. +* **MPI**: compatibility with boost::mpi interface. diff --git a/doc/reference/c++/arrays/lazy.rst b/doc/reference/arrays/lazy.rst similarity index 88% rename from doc/reference/c++/arrays/lazy.rst rename to doc/reference/arrays/lazy.rst index e8d97bfd..f0fcd1ba 100644 --- a/doc/reference/c++/arrays/lazy.rst +++ b/doc/reference/arrays/lazy.rst @@ -5,18 +5,18 @@ Interaction with CLEF expressions ============================================ -* The containers and their view classes can be used with the :doc:`../clef/contents` library : +* The containers and their view classes can be used with the :doc:`../clef/contents` library: * They can be called with CLEF expressions. * :doc:`Automatic assignment<../clef/assign>` has been set up. -* Using the CLEF library offers a quick and efficient way to fill an array with multiple advantages : +* Using the CLEF library offers a quick and efficient way to fill an array with multiple advantages: * It is simpler and more readeable than a series of for loops. * It is usually more optimal since the for loops are automatically written in the TraversalOrder of the array. -* **Example** : +* **Example**: .. triqs_example:: ./lazy_0.cpp .. note:: diff --git a/doc/reference/c++/arrays/lazy_0.cpp b/doc/reference/arrays/lazy_0.cpp similarity index 100% rename from doc/reference/c++/arrays/lazy_0.cpp rename to doc/reference/arrays/lazy_0.cpp diff --git a/doc/reference/c++/arrays/map.rst b/doc/reference/arrays/map.rst similarity index 91% rename from doc/reference/c++/arrays/map.rst rename to doc/reference/arrays/map.rst index 9728cca8..3387815f 100644 --- a/doc/reference/c++/arrays/map.rst +++ b/doc/reference/arrays/map.rst @@ -2,10 +2,10 @@ .. _arr_map_fold: -Functional constructs : map & fold +Functional constructs: map & fold ########################################### -Two standard functional constructs are provided : +Two standard functional constructs are provided: * *map* that promotes a function acting on the array element to an array function, acting element by element. @@ -32,14 +32,14 @@ map template auto map(f) (A const &) - with : + with: * A::value_type == T1 * The returned type of map(f) models the :ref:`ImmutableCuboidArray` concept * with the same domain as A * with value_type == T2 -* **Example** : +* **Example**: .. triqs_example:: ./map_0.cpp fold @@ -71,7 +71,7 @@ fold fold (f) ( A, R init = R() ) = f(f(f(f(init, a(0,0)), a(0,1)),a(0,2)),a(0,3), ....) - Note that : + Note that: * The order of traversal is the same as foreach. * The precise return type of fold is an implementation detail, depending on the precise type of f, @@ -79,7 +79,7 @@ fold * The function f will be inlined if possible, leading to efficient algorithms. * fold is implemented using a foreach loop, hence it is efficient. -* **Example** : +* **Example**: Many algorithms can be written in form of map/fold. @@ -96,10 +96,10 @@ fold reads : .. triqs_example:: ./map_1.cpp - Note in this example : + Note in this example: * the simplicity of the code - * the genericity : it is valid for any dimension of array. + * the genericity: it is valid for any dimension of array. * internally, the library will rewrite it as a series of for loop, ordered in the TraversalOrder of the array and inline the lambda. diff --git a/doc/reference/c++/arrays/map_0.cpp b/doc/reference/arrays/map_0.cpp similarity index 100% rename from doc/reference/c++/arrays/map_0.cpp rename to doc/reference/arrays/map_0.cpp diff --git a/doc/reference/c++/arrays/map_1.cpp b/doc/reference/arrays/map_1.cpp similarity index 100% rename from doc/reference/c++/arrays/map_1.cpp rename to doc/reference/arrays/map_1.cpp diff --git a/doc/reference/c++/arrays/multithreading.rst b/doc/reference/arrays/multithreading.rst similarity index 100% rename from doc/reference/c++/arrays/multithreading.rst rename to doc/reference/arrays/multithreading.rst diff --git a/doc/reference/c++/arrays/play_with_concept.rst b/doc/reference/arrays/play_with_concept.rst similarity index 73% rename from doc/reference/c++/arrays/play_with_concept.rst rename to doc/reference/arrays/play_with_concept.rst index c94605be..bd263911 100644 --- a/doc/reference/c++/arrays/play_with_concept.rst +++ b/doc/reference/arrays/play_with_concept.rst @@ -4,7 +4,7 @@ .. warning:: - This part is alpha : work in progress. May change at any time. + This part is alpha: work in progress. May change at any time. Using basic concepts ########################################### @@ -20,18 +20,18 @@ make_immutable_array * (1) From a clef expression, and a range for each placeholder in the expression, build - a lazy object modelling :ref:`ImmutableCuboidArray` concept, with the domain built from the ranges : + a lazy object modelling :ref:`ImmutableCuboidArray` concept, with the domain built from the ranges: Parameters are : * expr The lazy expression - * i_=R : `i_` is a placeholder, R a range. The `i_=R` produce a clef::pair of `i_` and R , which is the parameter. + * i_=R : `i_` is a placeholder, R a range. The `i_=R` produce a clef::pair of `i_` and R , which is the parameter. * (2) From a function object and a set of range, build - a lazy object modelling :ref:`ImmutableCuboidArray` concept, with the domain built from the ranges : + a lazy object modelling :ref:`ImmutableCuboidArray` concept, with the domain built from the ranges: -**Example** : +**Example**: .. triqs_example:: ./play_with_concept_0.cpp diff --git a/doc/reference/c++/arrays/play_with_concept_0.cpp b/doc/reference/arrays/play_with_concept_0.cpp similarity index 100% rename from doc/reference/c++/arrays/play_with_concept_0.cpp rename to doc/reference/arrays/play_with_concept_0.cpp diff --git a/doc/reference/c++/arrays/shape.rst b/doc/reference/arrays/shape.rst similarity index 100% rename from doc/reference/c++/arrays/shape.rst rename to doc/reference/arrays/shape.rst diff --git a/doc/reference/c++/arrays/shape_0.cpp b/doc/reference/arrays/shape_0.cpp similarity index 100% rename from doc/reference/c++/arrays/shape_0.cpp rename to doc/reference/arrays/shape_0.cpp diff --git a/doc/reference/c++/arrays/simple_fnt.rst b/doc/reference/arrays/simple_fnt.rst similarity index 100% rename from doc/reference/c++/arrays/simple_fnt.rst rename to doc/reference/arrays/simple_fnt.rst diff --git a/doc/reference/c++/arrays/simple_fnt_0.cpp b/doc/reference/arrays/simple_fnt_0.cpp similarity index 100% rename from doc/reference/c++/arrays/simple_fnt_0.cpp rename to doc/reference/arrays/simple_fnt_0.cpp diff --git a/doc/reference/c++/arrays/view_or_not_view.rst b/doc/reference/arrays/view_or_not_view.rst similarity index 99% rename from doc/reference/c++/arrays/view_or_not_view.rst rename to doc/reference/arrays/view_or_not_view.rst index d9dcf973..c9d6cbfc 100644 --- a/doc/reference/c++/arrays/view_or_not_view.rst +++ b/doc/reference/arrays/view_or_not_view.rst @@ -28,7 +28,7 @@ and the corresponding `view types`. * When copied, assigned, it makes deep copy of the data and resizes itself if necessary (like e.g. std::vector). - * Examples : + * Examples: * std::vector * triqs::arrays::array, triqs::arrays::matrix, triqs::arrays::vector @@ -43,7 +43,7 @@ and the corresponding `view types`. * They are useful to work on arrays, matrices, or on some part thereof, without making copies (e.g. on a slice of an array, a column of a matrix). - * Examples : + * Examples: * triqs::arrays::array_view, triqs::arrays::matrix_view, triqs::arrays::vector_view diff --git a/doc/reference/c++/contents.rst b/doc/reference/c++/contents.rst deleted file mode 100644 index 71d782fb..00000000 --- a/doc/reference/c++/contents.rst +++ /dev/null @@ -1,22 +0,0 @@ - -C++ -============= - -.. warning:: - - This documentation is work in progress. - -.. toctree:: - :maxdepth: 1 - - conventions - using_the_lib/contents - arrays/contents - gf/contents - clef/contents - mctools/intro - det_manip/contents - parameters/parameters - statistics/contents - utilities/contents - using_the_lib/profiling diff --git a/doc/reference/c++/parameters/CMakeLists.txt b/doc/reference/c++/parameters/CMakeLists.txt deleted file mode 100644 index 11bebf2f..00000000 --- a/doc/reference/c++/parameters/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Doxygen sources -set_property(GLOBAL APPEND PROPERTY DOXYGEN_SOURCES ${TRIQS_SOURCE_DIR}/triqs/parameters/parameters.hpp) - -all_tests() - diff --git a/doc/reference/c++/parameters/parameters.rst b/doc/reference/c++/parameters/parameters.rst deleted file mode 100644 index 159d4013..00000000 --- a/doc/reference/c++/parameters/parameters.rst +++ /dev/null @@ -1,141 +0,0 @@ -Parameters -=============== - -.. warning:: - - Library of beta quality. - - Documentation : just intro/tutorial, reference doc in progress. - - -Introduction --------------- - -The purpose of the class parameters is to handle program input parameters. -It provides a convenient way to pass several parameters of different types to a program. - -Parameters can be stored in a parameters object and accessed in a manner which is reminiscent of a Python dict: - -.. code-block:: c - - parameters P; - P["x"] = 3.14; - y = P["x"]; - -In Python the syntax is similar: - -.. code-block:: python - - import parameters as params - - P = params.Parameters() - P['x'] = 3.14 - y = P['x'] - -The class implements the following features: - -* storage of parameters of any type, including arrays -* C-like cast operations, such as integral type to double conversion as well as lexical cast to arithmetic types -* Python interface -* type checking -* hdf5 I/O operations -* write contents to std::ostream -* the class is boost-serializable - -parameter_defaults ------------------------------ - -When parameters are used within a program, a number of them are usually optional, in -the sense that they need not be provided by the user. This either means that the program -can run without them, or meaningful default values can be provided. - -Other parameters, on the other hand, may be required to be provided by the user. -These typically are parameters for which one cannot provide meaningful default values. - -These cases can be handled in a consistent manner using the parameter_defaults class. - -An object of this class allows to specify the name, type and documentation for all -required and optional parameters. Default values are provided for optional parameters: - -.. code-block:: c - - parameter_defaults pdef; - pdef.required("Beta", double(), "Inverse temperature") - .optional("N_time", int(100), "Number of time points") - .optional("N_freq", int(200), "Number of frequencies") - ; - -The default_parameters object serves two main purposes: Firstly, the input parameters can -be checked for completeness and correctness, i.e. they can be checked if all required parameters -are provided and have correct type. - -Secondly, the optional parameters provided through the input parameters can be checked whether they -have correct type. Those which are not provided can be added to the input parameter set with -their respective default values. -Both steps are performed through the update method of the parameter class: - -.. code-block:: c - - parameters P; - P["Beta"] = 3.14; - P.update(pdef); - -Given that the parameter_defaults are complete, the resulting parameter object contains all -parameters that the program will eventually access. - -Finally, the information stored in the defaults can be used to generate the help of the program, -by printing a list of its parameters: - -.. code-block:: c - - std::cout<` and -the :doxy:`parameter_defaults documentation` are available here. - -Parameter example -------------- - -.. triqs_example:: ./parameters_0.cpp -Parameter default value example -------------- - -.. triqs_example:: ./parameters_1.cpp -Python example -------------- - -.. code-block:: python - - import parameters as params - - P = params.Parameters() - P['num'] = 2.3 - P['str'] = "hello world" - print P - - dct = { 'a' : 10, 'b' : "a string"} - P.update(dct) # update from a dictionary - print P - - import numpy as np - a = np.array([[1,2],[3,4]]) - P['A'] = a # add an array - print P - - P.update2( c = 4, d= "u") # update from an initializer list - print P - - diff --git a/doc/reference/c++/parameters/parameters_0.cpp b/doc/reference/c++/parameters/parameters_0.cpp deleted file mode 100644 index b5ce3845..00000000 --- a/doc/reference/c++/parameters/parameters_0.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include -using triqs::params::parameters; -#include - -int main() { - - parameters P; -/* - P["a"] = long(1); - P["d"] = 2.7; - P["a_string"] = std::string("-14.3"); - P["char_string"] = "-14.3"; - - triqs::arrays::array A(2, 2); - A() = 0; - A(0, 0) = 1.3; - A(1, 1) = -8.2; - P["A"] = A; - std::cout << "A:" << P["A"] << std::endl; - - long a = P["a"]; - double x = P["a"]; // cast to double from long - double y = P["a_string"]; // lexical cast to double from string - std::cout << y << std::endl; -*/ - return 0; -} - diff --git a/doc/reference/c++/parameters/parameters_1.cpp b/doc/reference/c++/parameters/parameters_1.cpp deleted file mode 100644 index 37f7cbef..00000000 --- a/doc/reference/c++/parameters/parameters_1.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include -using triqs::params::parameters; - -int main() { -/* - parameters P; - P["Beta"] = 3.14; - - parameter_defaults pdef; - pdef.required("Beta", double(), "Inverse temperature").optional("Alpha", int(1000), "An integer").optional("Gamma", double(0.9), - "A double"); - - std::cout << pdef << std::endl; // print a comprehensive list of parameters: - std::cout << P << std::endl; - P.update(pdef); // check whether required parameters are present and update optional ones - std::cout << P << std::endl; -*/ -} - diff --git a/doc/reference/c++/clef/CMakeLists.txt b/doc/reference/clef/CMakeLists.txt similarity index 100% rename from doc/reference/c++/clef/CMakeLists.txt rename to doc/reference/clef/CMakeLists.txt diff --git a/doc/reference/c++/clef/assign.rst b/doc/reference/clef/assign.rst similarity index 98% rename from doc/reference/c++/clef/assign.rst rename to doc/reference/clef/assign.rst index 43d77902..00cb8a7d 100644 --- a/doc/reference/c++/clef/assign.rst +++ b/doc/reference/clef/assign.rst @@ -7,7 +7,7 @@ Automatic assignment of containers Another use of expression is the automatic assignment of containers. -**Synopsis** : +**Synopsis**: If C is a container, :: @@ -64,6 +64,6 @@ into :: -A complete example : +A complete example: .. triqs_example:: ./assign_1.cpp diff --git a/doc/reference/c++/clef/assign_0.cpp b/doc/reference/clef/assign_0.cpp similarity index 100% rename from doc/reference/c++/clef/assign_0.cpp rename to doc/reference/clef/assign_0.cpp diff --git a/doc/reference/c++/clef/assign_1.cpp b/doc/reference/clef/assign_1.cpp similarity index 100% rename from doc/reference/c++/clef/assign_1.cpp rename to doc/reference/clef/assign_1.cpp diff --git a/doc/reference/c++/clef/contents.rst b/doc/reference/clef/contents.rst similarity index 84% rename from doc/reference/c++/clef/contents.rst rename to doc/reference/clef/contents.rst index b00d451b..4148ea72 100644 --- a/doc/reference/c++/clef/contents.rst +++ b/doc/reference/clef/contents.rst @@ -1,5 +1,5 @@ -Clef -************************************* +Clef: Compile-time lazy expressions and functions +*************************************************** .. highlight:: c diff --git a/doc/reference/c++/clef/examples/contents.rst b/doc/reference/clef/examples/contents.rst similarity index 100% rename from doc/reference/c++/clef/examples/contents.rst rename to doc/reference/clef/examples/contents.rst diff --git a/doc/reference/c++/clef/examples/lazy_sum.rst b/doc/reference/clef/examples/lazy_sum.rst similarity index 100% rename from doc/reference/c++/clef/examples/lazy_sum.rst rename to doc/reference/clef/examples/lazy_sum.rst diff --git a/doc/reference/c++/clef/examples/src b/doc/reference/clef/examples/src similarity index 100% rename from doc/reference/c++/clef/examples/src rename to doc/reference/clef/examples/src diff --git a/doc/reference/c++/clef/expressions_eval.rst b/doc/reference/clef/expressions_eval.rst similarity index 89% rename from doc/reference/c++/clef/expressions_eval.rst rename to doc/reference/clef/expressions_eval.rst index f583c179..dab4bddb 100644 --- a/doc/reference/c++/clef/expressions_eval.rst +++ b/doc/reference/clef/expressions_eval.rst @@ -13,17 +13,17 @@ Expressions are evaluated with the eval function :: The evaluation can be : -* *complete* : when a value has been affected to every placeholder, so the result is not +* *complete*: when a value has been affected to every placeholder, so the result is not an expression any more, but the result of the computation.... -* *partial* : when some placeholder are still free (no value has been affected to them). +* *partial*: when some placeholder are still free (no value has been affected to them). The result is another expression where the parts that could be computed have been computed. Complete evaluation -------------------- .. triqs_example:: ./expressions_eval_0.cpp -Note that : +Note that: * The order of placeholder does not matter in calling eval. * It is an error to put the same placeholder twice. diff --git a/doc/reference/c++/clef/expressions_eval_0.cpp b/doc/reference/clef/expressions_eval_0.cpp similarity index 100% rename from doc/reference/c++/clef/expressions_eval_0.cpp rename to doc/reference/clef/expressions_eval_0.cpp diff --git a/doc/reference/c++/clef/expressions_form.rst b/doc/reference/clef/expressions_form.rst similarity index 79% rename from doc/reference/c++/clef/expressions_form.rst rename to doc/reference/clef/expressions_form.rst index 83356c97..5f4a6c3d 100644 --- a/doc/reference/c++/clef/expressions_form.rst +++ b/doc/reference/clef/expressions_form.rst @@ -19,7 +19,7 @@ Example :: placeholder <2> y_; Note that the only thing of significance in a placeholder is its type (i.e. -a number). A placeholder is **empty** : it contains **no value** at runtime. +a number). A placeholder is **empty**: it contains **no value** at runtime. .. warning:: @@ -27,12 +27,12 @@ a number). A placeholder is **empty** : it contains **no value** at runtime. placeholder <1> y_; - would imply that `x_` is the same as `y_` : `x_` == `y_` will be always true. + would imply that `x_` is the same as `y_`: `x_` == `y_` will be always true. Forming an expression ------------------------ -CLEF expressions are made of : +CLEF expressions are made of: * Placeholders * Binary operations on expressions `(+, -, *, /, >, <, >=, <=, ==)` @@ -40,15 +40,15 @@ CLEF expressions are made of : * Callable objects which overload the operator () for CLEF expressions, See :ref:`callable_object`. * Functions overloaded for CLEF expressions. For example, the header `math.hpp` contains the declaration to make the basic function of std `math.h` accept CLEF_expressions. -* In fact, almost anything : the *make_expr* function can be called on any object to make it lazy. +* In fact, almost anything: the *make_expr* function can be called on any object to make it lazy. -Examples : +Examples: .. triqs_example:: ./expressions_form_0.cpp -Note that : +Note that: * Expressions do not compute anything, they just store the expression tree. -* There is no check of correctness here in general : an expression can be well formed, +* There is no check of correctness here in general: an expression can be well formed, but meaningless, e.g. :: auto e = cos(2*x_, 8); // ! @@ -66,7 +66,7 @@ at compile time:: // the type of e is something like expr, expr > -Note that : +Note that: * As a user, one *never* has to write such a type. One always use expression "on the fly", or use auto. @@ -81,17 +81,17 @@ Note that : * reference it is an lvalue. - * value it is an rvalue : an rvalue (i.e. a temporary) is *moved* into the tree, using + * value it is an rvalue: an rvalue (i.e. a temporary) is *moved* into the tree, using move semantics. - Exceptions : the following objects are always copied : placeholders, expression themselves. + Exceptions: the following objects are always copied: placeholders, expression themselves. Example :: double a = 3; auto e = a + 2* x_ ; // a is stored by reference (double &), but 2 is stored by value - The rational is as follows : + The rational is as follows: * rvalue must be moved, otherwise we would keep (dangling) reference to temporaries. * for lvalue, keeping a reference is quicker. Of course, in the previous example, diff --git a/doc/reference/c++/clef/expressions_form_0.cpp b/doc/reference/clef/expressions_form_0.cpp similarity index 100% rename from doc/reference/c++/clef/expressions_form_0.cpp rename to doc/reference/clef/expressions_form_0.cpp diff --git a/doc/reference/c++/clef/function.rst b/doc/reference/clef/function.rst similarity index 99% rename from doc/reference/c++/clef/function.rst rename to doc/reference/clef/function.rst index e9aa2c9f..8272e669 100644 --- a/doc/reference/c++/clef/function.rst +++ b/doc/reference/clef/function.rst @@ -30,7 +30,7 @@ then f is :: a function (x1,x2,x3) --> RESULT -where RESULT is : +where RESULT is: * the result of the complete evaluation of the expression if the list of placeholder exhausts the placeholders of the expression. * otherwise a clef_expression of the remaining placeholders, returning a **function**. diff --git a/doc/reference/c++/clef/function_0.cpp b/doc/reference/clef/function_0.cpp similarity index 100% rename from doc/reference/c++/clef/function_0.cpp rename to doc/reference/clef/function_0.cpp diff --git a/doc/reference/c++/clef/introduction.rst b/doc/reference/clef/introduction.rst similarity index 83% rename from doc/reference/c++/clef/introduction.rst rename to doc/reference/clef/introduction.rst index 948b9e99..3ea3bb11 100644 --- a/doc/reference/c++/clef/introduction.rst +++ b/doc/reference/clef/introduction.rst @@ -1,7 +1,7 @@ .. highlight:: c -Motivation : a little tour of CLEF +Motivation: a little tour of CLEF ===================================== As usual, the best is to start with a few examples, to show the library in action. diff --git a/doc/reference/c++/clef/introduction_0.cpp b/doc/reference/clef/introduction_0.cpp similarity index 100% rename from doc/reference/c++/clef/introduction_0.cpp rename to doc/reference/clef/introduction_0.cpp diff --git a/doc/reference/c++/clef/overload.rst b/doc/reference/clef/overload.rst similarity index 91% rename from doc/reference/c++/clef/overload.rst rename to doc/reference/clef/overload.rst index 8c212f6d..5d1bb32e 100644 --- a/doc/reference/c++/clef/overload.rst +++ b/doc/reference/clef/overload.rst @@ -20,12 +20,12 @@ using the `TRIQS_CLEF_MAKE_FNT_LAZY` macro. For example: .. triqs_example:: ./overload_0.cpp -Note that : +Note that: * This overload **must** be defined in the triqs::clef namespace, since it is found by ADL. * The function `foo` can have many overloads. * The function `bar` can be a template, BUT then the template must be disabled for lazy expressions. -* The overload is already defined by clef for usual functions : +* The overload is already defined by clef for usual functions: .. triqs_example:: ./overload_1.cpp .. _callable_object: @@ -35,12 +35,12 @@ Overloading operator() and other methods Similarly to functions, classes can define an `operator()` for CLEF expressions arguments (or any other method). -It is an ordinary operator() that must : +It is an ordinary operator() that must: * Be enabled only when one argument is a CLEF expression * Return a CLEF expression. -Example : +Example: .. triqs_example:: ./overload_2.cpp **NB** When the method or the non CLEF operator() is already a template, diff --git a/doc/reference/c++/clef/overload_0.cpp b/doc/reference/clef/overload_0.cpp similarity index 100% rename from doc/reference/c++/clef/overload_0.cpp rename to doc/reference/clef/overload_0.cpp diff --git a/doc/reference/c++/clef/overload_1.cpp b/doc/reference/clef/overload_1.cpp similarity index 100% rename from doc/reference/c++/clef/overload_1.cpp rename to doc/reference/clef/overload_1.cpp diff --git a/doc/reference/c++/clef/overload_2.cpp b/doc/reference/clef/overload_2.cpp similarity index 100% rename from doc/reference/c++/clef/overload_2.cpp rename to doc/reference/clef/overload_2.cpp diff --git a/doc/reference/c++/conventions.rst b/doc/reference/conventions.rst similarity index 97% rename from doc/reference/c++/conventions.rst rename to doc/reference/conventions.rst index e4c4c520..428c2f6f 100644 --- a/doc/reference/c++/conventions.rst +++ b/doc/reference/conventions.rst @@ -1,5 +1,5 @@ -C++11/14 & notations -===================== +C++11/14 and notations +======================== C++11/C++14 --------------- diff --git a/doc/reference/c++/det_manip/CMakeLists.txt b/doc/reference/determinant_manipulation/CMakeLists.txt similarity index 100% rename from doc/reference/c++/det_manip/CMakeLists.txt rename to doc/reference/determinant_manipulation/CMakeLists.txt diff --git a/doc/reference/c++/det_manip/behind.rst b/doc/reference/determinant_manipulation/behind.rst similarity index 100% rename from doc/reference/c++/det_manip/behind.rst rename to doc/reference/determinant_manipulation/behind.rst diff --git a/doc/reference/c++/det_manip/contents.rst b/doc/reference/determinant_manipulation/contents.rst similarity index 93% rename from doc/reference/c++/det_manip/contents.rst rename to doc/reference/determinant_manipulation/contents.rst index 5075cb50..63df9320 100644 --- a/doc/reference/c++/det_manip/contents.rst +++ b/doc/reference/determinant_manipulation/contents.rst @@ -19,14 +19,14 @@ we can define the :math:`N\times N` square matrix 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. -This class implements these general operations. It contains : +This class implements these general operations. It contains: -* Datas : +* Datas: * :math:`M^{-1}` and :math:`det M` * a vector containing :math:`x_i,y_i \ 0\leq i \leq N` -* Methods to quickly update :math:`M^{-1}` and :math:`\det M` when one : +* Methods to quickly update :math:`M^{-1}` and :math:`\det M` when one: * adds/removes a line and a column (i.e. adding or removing one x and one y) * adds/removes two lines and two columns (i.e. adding or removing two x and two y) diff --git a/doc/reference/c++/det_manip/det_manip.rst b/doc/reference/determinant_manipulation/det_manip.rst similarity index 97% rename from doc/reference/c++/det_manip/det_manip.rst rename to doc/reference/determinant_manipulation/det_manip.rst index 367b03d6..a060c9af 100644 --- a/doc/reference/c++/det_manip/det_manip.rst +++ b/doc/reference/determinant_manipulation/det_manip.rst @@ -9,8 +9,8 @@ Parameter & construction The template parameter is the **FunctionType**, the type of F, 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). + * return_type: type returned by the function + * argument_type: type of the argument of the function (type of x and y). Public types @@ -61,9 +61,9 @@ Public member functions +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 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 | 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. | +| 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. | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -87,7 +87,7 @@ Public member functions Synopsis ----------- -* The possible operations on the matrix M are : +* The possible operations on the matrix M are: +------------+--------------------------------+ | Operation | Effect | @@ -129,7 +129,7 @@ Synopsis Complete the last operation OP (the last called try_OP), by updating the list of x and y and the inverse of the matrix to :math:`(M')^{-1}`. -* This structure is designed to write Monte Carlo algorithms : +* This structure is designed to write Monte Carlo algorithms: * the try part of the move calls some try_OP * if and only if the move is accepted, is the complete_operation called. diff --git a/doc/reference/c++/det_manip/det_manip_0.cpp b/doc/reference/determinant_manipulation/det_manip_0.cpp similarity index 100% rename from doc/reference/c++/det_manip/det_manip_0.cpp rename to doc/reference/determinant_manipulation/det_manip_0.cpp diff --git a/doc/reference/c++/gf/CMakeLists.txt b/doc/reference/gfs/c++/CMakeLists.txt similarity index 100% rename from doc/reference/c++/gf/CMakeLists.txt rename to doc/reference/gfs/c++/CMakeLists.txt diff --git a/doc/reference/c++/gf/clef.rst b/doc/reference/gfs/c++/clef.rst similarity index 89% rename from doc/reference/c++/gf/clef.rst rename to doc/reference/gfs/c++/clef.rst index 6d23713a..c47c05de 100644 --- a/doc/reference/c++/gf/clef.rst +++ b/doc/reference/gfs/c++/clef.rst @@ -5,17 +5,17 @@ Interaction with CLEF expressions ============================================ -The gf containers and their view classes can be used with the :doc:`../clef/contents` library : +The gf containers and their view classes can be used with the :doc:`../clef/contents` library: * They can be called with CLEF expressions. * :doc:`Automatic assignment<../clef/assign>` has been set up. -Using the CLEF library offers a quick and efficient way to fill an array with multiple advantages : +Using the CLEF library offers a quick and efficient way to fill an array with multiple advantages: * It is simpler and more readeable than a series of for loops. * It is more optimal since the loops are automatically written in the best order for memory traversal. -**Example** : +**Example**: .. triqs_example:: ./clef_0.cpp .. note:: diff --git a/doc/reference/c++/gf/clef_0.cpp b/doc/reference/gfs/c++/clef_0.cpp similarity index 100% rename from doc/reference/c++/gf/clef_0.cpp rename to doc/reference/gfs/c++/clef_0.cpp diff --git a/doc/reference/c++/gf/concepts.rst b/doc/reference/gfs/c++/concepts.rst similarity index 90% rename from doc/reference/c++/gf/concepts.rst rename to doc/reference/gfs/c++/concepts.rst index 6ffbb2d3..0b2e2458 100644 --- a/doc/reference/c++/gf/concepts.rst +++ b/doc/reference/gfs/c++/concepts.rst @@ -3,10 +3,10 @@ Concepts ################# -A Green function is simply a function, which has : +A Green function is simply a function, which has: * a `domain` for its variable(s) (e.g. Matsubara/real time/frequencies, Legendre coefficients). -* a `target` space, i.e. the value of the Green function which can be : +* a `target` space, i.e. the value of the Green function which can be: * a scalar (double, complex) * a matrix, @@ -34,12 +34,12 @@ and the notion of `function on a grid`. Domain ------------------------------------------------- -* **Purpose** : The domain of definition of a function. It is a mathematical definition of the domain, +* **Purpose** : The domain of definition of a function. It is a mathematical definition of the domain, and does not contain any mesh, or details on its representation in a computer. -* **Refines** : RegularType. +* **Refines**: RegularType. -* **Definition** : +* **Definition**: +----------+--------------------------------------------------------------------+ | Elements | Comment | @@ -51,7 +51,7 @@ Domain * **Examples** : * Matsubara time - * Matsubara frequencies (boson/fermion) : in this case, point_t is `matsubara_freq`, a simple type containing (n, beta, statistics). + * Matsubara frequencies (boson/fermion): in this case, point_t is `matsubara_freq`, a simple type containing (n, beta, statistics). * Real frequencies * Real time * Brillouin zone @@ -62,14 +62,14 @@ Domain PureFunctionOnDomain ----------------------- -* **Purpose** : +* **Purpose** : A mathematical (pure) function from a domain to a target space. * it has a domain of definition * it can be called on any point of the domain, as a *pure* function, i.e. without any side effect. * **Refines** : -* **Definition** : +* **Definition**: +--------------------------------------+----------------------------------------------------------+ | Elements | Comment | @@ -80,7 +80,7 @@ PureFunctionOnDomain | | if it is in the domain... | +--------------------------------------+----------------------------------------------------------+ -* NB : Note that the return type of the function is *NOT* part of the concept, +* NB: Note that the return type of the function is *NOT* part of the concept, it has to be deduced by the compiler (using C++11 decltype, std::result_of, eg..). .. note:: @@ -92,13 +92,13 @@ PureFunctionOnDomain Mesh ------------------------------------------------- -* **Purpose** : A mesh over a domain, and more generally the practical representation of the domain in a computer. - It does not really need to be a mesh : e.g. if the function is represented on a polynomial basis, +* **Purpose** : A mesh over a domain, and more generally the practical representation of the domain in a computer. + It does not really need to be a mesh: e.g. if the function is represented on a polynomial basis, it is the parameters of this representation (max number of coordinates, e.g.) -* **Refines** : RegularType, H5-serializable, Printable. +* **Refines**: RegularType, H5-serializable, Printable. -* **Definition** : +* **Definition**: +-------------------------------------------------------+-------------------------------------------------------------------------------+ | Elements | Comment | @@ -140,11 +140,11 @@ Mesh MeshPoint ------------------------------------------------- -* **Purpose** : Abstraction of a point on a mesh. A little more than a ref to the mesh and a index. +* **Purpose** : Abstraction of a point on a mesh. A little more than a ref to the mesh and a index. -* **Refines** : CopyConstructible. +* **Refines**: CopyConstructible. -* **Definition** : +* **Definition**: +------------------------------------------------+--------------------------------------------------------------------+ | Elements | Comment | @@ -155,9 +155,9 @@ MeshPoint +------------------------------------------------+--------------------------------------------------------------------+ | mesh_t::index_t index | The index of the point | +------------------------------------------------+--------------------------------------------------------------------+ -| mesh_point_t( mesh_t const &, index_t const &) | Constructor : a mesh point at the given index | +| mesh_point_t( mesh_t const &, index_t const &) | Constructor: a mesh point at the given index | +------------------------------------------------+--------------------------------------------------------------------+ -| mesh_point_t( mesh_t const &) | Constructor : the first mesh point | +| mesh_point_t( mesh_t const &) | Constructor: the first mesh point | +------------------------------------------------+--------------------------------------------------------------------+ | mesh_t::index_t [const &,] index() const | The index corresponding to the point | +------------------------------------------------+--------------------------------------------------------------------+ @@ -176,7 +176,7 @@ MeshPoint For one dimensional mesh, we also require that the MeshPoint implement the basic arithmetic operations using the cast. -* **Discussion** : +* **Discussion**: A MeshPoint is just an index of a point on the mesh, and containers like gf can easily be overloaded for this type to have a direct access to the grid (Cf [] operator of gf). @@ -192,7 +192,7 @@ As a result, because iterating on a mesh result in a series of object modelling one can write naturally :: // example of g, a Green function in Matsubara frequencies w - for (auto w : g.mesh()) + for (auto w: g.mesh()) g[w] = 1/(w + 2) // This runs overs the mesh, and fills the function with 1/(w+2) // In this expression, w is casted to the domain_t::point_t, here a complex diff --git a/doc/reference/c++/gf/contents.rst b/doc/reference/gfs/c++/contents.rst similarity index 69% rename from doc/reference/c++/gf/contents.rst rename to doc/reference/gfs/c++/contents.rst index 90008f1c..c218e4fa 100644 --- a/doc/reference/c++/gf/contents.rst +++ b/doc/reference/gfs/c++/contents.rst @@ -1,14 +1,11 @@ .. _greenfunctions: -Green functions -================= +C++ documentation +========================= The TRIQS library provides a generic container `gf` and its views `gf_view` and `gf_const_view`, to store and manipulate various Green functions. -.. warning:: - - This library is still alpha. API may evolve. Documentation still in progress. .. toctree:: :maxdepth: 2 diff --git a/doc/reference/c++/gf/fit_tail.rst b/doc/reference/gfs/c++/fit_tail.rst similarity index 100% rename from doc/reference/c++/gf/fit_tail.rst rename to doc/reference/gfs/c++/fit_tail.rst diff --git a/doc/reference/c++/gf/fourier.rst b/doc/reference/gfs/c++/fourier.rst similarity index 98% rename from doc/reference/c++/gf/fourier.rst rename to doc/reference/gfs/c++/fourier.rst index f86da8ac..867b22c7 100644 --- a/doc/reference/c++/gf/fourier.rst +++ b/doc/reference/gfs/c++/fourier.rst @@ -57,7 +57,7 @@ Since *fourier* returns a small lazy object, the library can then rewrite (1) in where all the information about the mesh of gw is now available to the implementation. Moreover, since fourier(gt) does not possess a domain (for the same reason), (1) -makes no sense : RHS of gf assignment requires a domain (cf concepts). +makes no sense: RHS of gf assignment requires a domain (cf concepts). We therefore use *a view* as LHS:: gw() = fourier(gt); // correct usage. diff --git a/doc/reference/c++/gf/fourier_0.cpp b/doc/reference/gfs/c++/fourier_0.cpp similarity index 100% rename from doc/reference/c++/gf/fourier_0.cpp rename to doc/reference/gfs/c++/fourier_0.cpp diff --git a/doc/reference/c++/gf/fourier_impl_notes.rst b/doc/reference/gfs/c++/fourier_impl_notes.rst similarity index 99% rename from doc/reference/c++/gf/fourier_impl_notes.rst rename to doc/reference/gfs/c++/fourier_impl_notes.rst index 39661457..433fbf78 100644 --- a/doc/reference/c++/gf/fourier_impl_notes.rst +++ b/doc/reference/gfs/c++/fourier_impl_notes.rst @@ -1,6 +1,6 @@ .. highlight:: c -Fourier : implementation notes +Fourier: implementation notes ####################################### diff --git a/doc/reference/c++/gf/gf_and_view.rst b/doc/reference/gfs/c++/gf_and_view.rst similarity index 98% rename from doc/reference/c++/gf/gf_and_view.rst rename to doc/reference/gfs/c++/gf_and_view.rst index 9980a3a9..6e9ebb14 100644 --- a/doc/reference/c++/gf/gf_and_view.rst +++ b/doc/reference/gfs/c++/gf_and_view.rst @@ -33,7 +33,7 @@ Template parameters The various specializations of the container and its views are decribed in in the :ref:`specializations` page. -The *Variable* template parameter can take the following values : +The *Variable* template parameter can take the following values: +--------------------------+--------------------------------------------+ | Variable | Meaning | @@ -53,7 +53,7 @@ The *Variable* template parameter can take the following values : | cartesian_product | Cartesian product of gf ... functions. | +--------------------------+--------------------------------------------+ -The *Target* template parameter can take the following values : +The *Target* template parameter can take the following values: +-------------------------+-----------------------------------------------------+ | Target | Meaning | diff --git a/doc/reference/c++/gf/gf_assign.rst b/doc/reference/gfs/c++/gf_assign.rst similarity index 100% rename from doc/reference/c++/gf/gf_assign.rst rename to doc/reference/gfs/c++/gf_assign.rst diff --git a/doc/reference/c++/gf/gf_block.rst b/doc/reference/gfs/c++/gf_block.rst similarity index 99% rename from doc/reference/c++/gf/gf_block.rst rename to doc/reference/gfs/c++/gf_block.rst index f1a0c5f9..e6bf6eba 100644 --- a/doc/reference/c++/gf/gf_block.rst +++ b/doc/reference/gfs/c++/gf_block.rst @@ -123,7 +123,7 @@ TO BE COMPLETED. Block gf have a natural iterator, e.g. :: // if a BG is block function - for (auto & g : BG) .... + for (auto & g: BG) .... diff --git a/doc/reference/c++/gf/gf_block_0.cpp b/doc/reference/gfs/c++/gf_block_0.cpp similarity index 100% rename from doc/reference/c++/gf/gf_block_0.cpp rename to doc/reference/gfs/c++/gf_block_0.cpp diff --git a/doc/reference/c++/gf/gf_call.rst b/doc/reference/gfs/c++/gf_call.rst similarity index 87% rename from doc/reference/c++/gf/gf_call.rst rename to doc/reference/gfs/c++/gf_call.rst index b2ce3115..ff32192b 100644 --- a/doc/reference/c++/gf/gf_call.rst +++ b/doc/reference/gfs/c++/gf_call.rst @@ -19,7 +19,7 @@ by any means (e.g. interpolation) that the specialization define. For example, g(t) for a Green function in time would return some interpolation of the value of g between the closest mesh point. -Hence, this operator is only const : it would make no sense to modify g(t). +Hence, this operator is only const: it would make no sense to modify g(t). (to modify the Green function, cf operator []). However, the Clef automatic assignment method (cf...) *is* written @@ -28,7 +28,7 @@ It would be more logical to use [], but a strange, old and extremely inconvenien forbids to overload [] for multiple variables... -NB : This is valid for both the container (e.g. gf), and the view (e.g. gf_view). +NB: This is valid for both the container (e.g. gf), and the view (e.g. gf_view). .. _gf_element_access: @@ -38,7 +38,7 @@ NB : This is valid for both the container (e.g. gf), and the view (e.g. gf_view) Evaluation at one point of the domain. -NB : Specialization may provide other overloads. +NB: Specialization may provide other overloads. .. _gf_making_view: diff --git a/doc/reference/c++/gf/gf_constructors.rst b/doc/reference/gfs/c++/gf_constructors.rst similarity index 80% rename from doc/reference/c++/gf/gf_constructors.rst rename to doc/reference/gfs/c++/gf_constructors.rst index 1b2b595c..da6c033d 100644 --- a/doc/reference/c++/gf/gf_constructors.rst +++ b/doc/reference/gfs/c++/gf_constructors.rst @@ -23,20 +23,20 @@ Constructors of gf | gf(gf_const_view & g) | Make a clone of the const view. | +--------------------------------+-------------------------------------------------------------------------------------------------------------------+ | gf(mesh_t m, target_shape_t s) | Constructs a gf with mesh m and a target shape s. s depends on the specialization: it is the information needed | -| | to construct the gf, aside from the mesh itself : typically the size of the matrix for a matrix_valued gf. | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------+ +| | to construct the gf, aside from the mesh itself: typically the size of the matrix for a matrix_valued gf. | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------+ | | target_shape_t is described in the specialization section. section XXX). The function is initialized to 0 | +--------------------------------+-------------------------------------------------------------------------------------------------------------------+ | gf(mesh_t m, data_t dat, | *[Advanced]* Construct a gf from its elements (a mesh, a data array, a singularity, a symmetry, and an evaluator. | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------+ | singularity_view_t const & si, | Normally should be reserved for lib purposes...(remove from the doc ?). | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------+ | symmetry_t const & s, | | ++--------------------------------+-------------------------------------------------------------------------------------------------------------------+ | evaluator_t const & eval) | | +--------------------------------+-------------------------------------------------------------------------------------------------------------------+ - - -Examples ------------- - There are more examples for each specializations in the corresponding pages. diff --git a/doc/reference/c++/gf/gf_constructors_0.cpp b/doc/reference/gfs/c++/gf_constructors_0.cpp similarity index 100% rename from doc/reference/c++/gf/gf_constructors_0.cpp rename to doc/reference/gfs/c++/gf_constructors_0.cpp diff --git a/doc/reference/c++/gf/gf_data.rst b/doc/reference/gfs/c++/gf_data.rst similarity index 100% rename from doc/reference/c++/gf/gf_data.rst rename to doc/reference/gfs/c++/gf_data.rst diff --git a/doc/reference/c++/gf/gf_imfreq.rst b/doc/reference/gfs/c++/gf_imfreq.rst similarity index 82% rename from doc/reference/c++/gf/gf_imfreq.rst rename to doc/reference/gfs/c++/gf_imfreq.rst index f0d501f3..43386da0 100644 --- a/doc/reference/c++/gf/gf_imfreq.rst +++ b/doc/reference/gfs/c++/gf_imfreq.rst @@ -14,7 +14,7 @@ Synopsis gf -The *Target* template parameter can take the following values : +The *Target* template parameter can take the following values: +-------------------------+-----------------------------------------------------+ | Target | Meaning | @@ -45,12 +45,12 @@ Evaluation method * No interpolation. -* Return type : +* Return type: - * If Target==scalar_valued : a complex - * If Target==matrix_valued : an object modeling ImmutableMatrix concept. + * If Target==scalar_valued: a complex + * If Target==matrix_valued: an object modeling ImmutableMatrix concept. -* When the point is outside of the mesh, the evaluation of the gf returns : +* When the point is outside of the mesh, the evaluation of the gf returns: * the evaluation of the high frequency tail if no_tail is not set. * 0 otherwise @@ -61,22 +61,22 @@ Data storage * If Target==scalar_valued : - * `data_t` : 1d array of complex. + * `data_t`: 1d array of complex. * g.data()(i) is the value of g for the i-th point of the mesh. * If Target==matrix_valued : - * `data_t` : 3d array (C ordered) of complex. + * `data_t`: 3d array (C ordered) of complex. * g.data()(i, range(), range()) is the value of g for the i-th point of the mesh. HDF5 storage convention --------------------------- -h5 tag : `ImFreq` +h5 tag: `ImFreq` -TODO : DECIDE if we have 2 tag, one for scalar, one for matrix.... +TODO: DECIDE if we have 2 tag, one for scalar, one for matrix.... Examples --------- diff --git a/doc/reference/c++/gf/gf_imfreq_0.cpp b/doc/reference/gfs/c++/gf_imfreq_0.cpp similarity index 100% rename from doc/reference/c++/gf/gf_imfreq_0.cpp rename to doc/reference/gfs/c++/gf_imfreq_0.cpp diff --git a/doc/reference/c++/gf/gf_imtime.rst b/doc/reference/gfs/c++/gf_imtime.rst similarity index 84% rename from doc/reference/c++/gf/gf_imtime.rst rename to doc/reference/gfs/c++/gf_imtime.rst index 28c88ad8..a61d5b10 100644 --- a/doc/reference/c++/gf/gf_imtime.rst +++ b/doc/reference/gfs/c++/gf_imtime.rst @@ -14,7 +14,7 @@ Synopsis gf -The *Target* template parameter can take the following values : +The *Target* template parameter can take the following values: +-------------------------+-----------------------------------------------------+ | Target | Meaning | @@ -49,12 +49,12 @@ Evaluation method * Use a linear interpolation between the two closest point of the mesh. -* Return type : +* Return type: - * If Target==scalar_valued : a complex - * If Target==matrix_valued : an object modeling ImmutableMatrix concept. + * If Target==scalar_valued: a complex + * If Target==matrix_valued: an object modeling ImmutableMatrix concept. -* When the point is outside of the mesh, the evaluation of the gf returns : +* When the point is outside of the mesh, the evaluation of the gf returns: * the evaluation of the high frequency tail if no_tail is not set. * 0 otherwise @@ -65,23 +65,23 @@ Data storage * If Target==scalar_valued : - * `data_t` : 1d array of complex. + * `data_t`: 1d array of complex. * g.data()(i) is the value of g for the i-th point of the mesh. * If Target==matrix_valued : - * `data_t` : 3d array (C ordered) of complex. + * `data_t`: 3d array (C ordered) of complex. * g.data()(i, range(), range()) is the value of g for the i-th point of the mesh. -TO DO : complex OR DOUBLE : FIX and document !! +TO DO: complex OR DOUBLE: FIX and document !! HDF5 storage convention --------------------------- -h5 tag : `ImTime` +h5 tag: `ImTime` Examples diff --git a/doc/reference/c++/gf/gf_imtime_0.cpp b/doc/reference/gfs/c++/gf_imtime_0.cpp similarity index 100% rename from doc/reference/c++/gf/gf_imtime_0.cpp rename to doc/reference/gfs/c++/gf_imtime_0.cpp diff --git a/doc/reference/c++/gf/gf_legendre.rst b/doc/reference/gfs/c++/gf_legendre.rst similarity index 93% rename from doc/reference/c++/gf/gf_legendre.rst rename to doc/reference/gfs/c++/gf_legendre.rst index b60890bf..f8eeafbb 100644 --- a/doc/reference/c++/gf/gf_legendre.rst +++ b/doc/reference/gfs/c++/gf_legendre.rst @@ -14,7 +14,7 @@ Synopsis gf -The *Target* template parameter can take the following values : +The *Target* template parameter can take the following values: +-------------------------+-----------------------------------------------------+ | Target | Meaning | @@ -48,7 +48,7 @@ TO BE WRITTEN HDF5 storage convention --------------------------- -h5 tag : `Legendre` +h5 tag: `Legendre` Examples --------- diff --git a/doc/reference/c++/gf/gf_legendre_0.cpp b/doc/reference/gfs/c++/gf_legendre_0.cpp similarity index 100% rename from doc/reference/c++/gf/gf_legendre_0.cpp rename to doc/reference/gfs/c++/gf_legendre_0.cpp diff --git a/doc/reference/c++/gf/gf_misc.rst b/doc/reference/gfs/c++/gf_misc.rst similarity index 100% rename from doc/reference/c++/gf/gf_misc.rst rename to doc/reference/gfs/c++/gf_misc.rst diff --git a/doc/reference/c++/gf/gf_part_eval_curry.rst b/doc/reference/gfs/c++/gf_part_eval_curry.rst similarity index 100% rename from doc/reference/c++/gf/gf_part_eval_curry.rst rename to doc/reference/gfs/c++/gf_part_eval_curry.rst diff --git a/doc/reference/c++/gf/gf_part_eval_curry_0.cpp b/doc/reference/gfs/c++/gf_part_eval_curry_0.cpp similarity index 100% rename from doc/reference/c++/gf/gf_part_eval_curry_0.cpp rename to doc/reference/gfs/c++/gf_part_eval_curry_0.cpp diff --git a/doc/reference/c++/gf/gf_part_eval_curry_1.cpp b/doc/reference/gfs/c++/gf_part_eval_curry_1.cpp similarity index 100% rename from doc/reference/c++/gf/gf_part_eval_curry_1.cpp rename to doc/reference/gfs/c++/gf_part_eval_curry_1.cpp diff --git a/doc/reference/c++/gf/gf_product.rst b/doc/reference/gfs/c++/gf_product.rst similarity index 99% rename from doc/reference/c++/gf/gf_product.rst rename to doc/reference/gfs/c++/gf_product.rst index 1481802b..ce559c0d 100644 --- a/doc/reference/c++/gf/gf_product.rst +++ b/doc/reference/gfs/c++/gf_product.rst @@ -44,7 +44,7 @@ so that the first indices are *not* flatten. EXPLAIN. Functional techniques ------------------------ -See : +See: .. toctree:: diff --git a/doc/reference/c++/gf/gf_product_0.cpp b/doc/reference/gfs/c++/gf_product_0.cpp similarity index 100% rename from doc/reference/c++/gf/gf_product_0.cpp rename to doc/reference/gfs/c++/gf_product_0.cpp diff --git a/doc/reference/c++/gf/gf_refreq.rst b/doc/reference/gfs/c++/gf_refreq.rst similarity index 84% rename from doc/reference/c++/gf/gf_refreq.rst rename to doc/reference/gfs/c++/gf_refreq.rst index a682dcd0..46a5968c 100644 --- a/doc/reference/c++/gf/gf_refreq.rst +++ b/doc/reference/gfs/c++/gf_refreq.rst @@ -15,7 +15,7 @@ Synopsis gf -The *Target* template parameter can take the following values : +The *Target* template parameter can take the following values: +-------------------------+-----------------------------------------------------+ | Target | Meaning | @@ -46,12 +46,12 @@ Evaluation method * Linear interpolation on the mesh. -* Return type : +* Return type: - * If Target==scalar_valued : a complex - * If Target==matrix_valued : an object modeling ImmutableMatrix concept. + * If Target==scalar_valued: a complex + * If Target==matrix_valued: an object modeling ImmutableMatrix concept. -* When the point is outside of the mesh, the evaluation of the gf returns : +* When the point is outside of the mesh, the evaluation of the gf returns: * the evaluation of the high frequency tail if no_tail is not set. * 0 otherwise @@ -62,20 +62,20 @@ Data storage * If Target==scalar_valued : - * `data_t` : 1d array of complex. + * `data_t`: 1d array of complex. * g.data()(i) is the value of g for the i-th point of the mesh. * If Target==matrix_valued : - * `data_t` : 3d array (C ordered) of complex. + * `data_t`: 3d array (C ordered) of complex. * g.data()(i, range(), range()) is the value of g for the i-th point of the mesh. HDF5 storage convention --------------------------- -h5 tag : `ReFreq` +h5 tag: `ReFreq` Examples --------- diff --git a/doc/reference/c++/gf/gf_refreq_0.cpp b/doc/reference/gfs/c++/gf_refreq_0.cpp similarity index 100% rename from doc/reference/c++/gf/gf_refreq_0.cpp rename to doc/reference/gfs/c++/gf_refreq_0.cpp diff --git a/doc/reference/c++/gf/gf_reinterpret.rst b/doc/reference/gfs/c++/gf_reinterpret.rst similarity index 100% rename from doc/reference/c++/gf/gf_reinterpret.rst rename to doc/reference/gfs/c++/gf_reinterpret.rst diff --git a/doc/reference/c++/gf/gf_retime.rst b/doc/reference/gfs/c++/gf_retime.rst similarity index 84% rename from doc/reference/c++/gf/gf_retime.rst rename to doc/reference/gfs/c++/gf_retime.rst index c1a8e38a..5cdcb3bc 100644 --- a/doc/reference/c++/gf/gf_retime.rst +++ b/doc/reference/gfs/c++/gf_retime.rst @@ -16,7 +16,7 @@ Synopsis gf -The *Target* template parameter can take the following values : +The *Target* template parameter can take the following values: +-------------------------+-----------------------------------------------------+ | Target | Meaning | @@ -47,12 +47,12 @@ Evaluation method * Linear interpolation on the mesh. -* Return type : +* Return type: - * If Target==scalar_valued : a complex - * If Target==matrix_valued : an object modeling ImmutableMatrix concept. + * If Target==scalar_valued: a complex + * If Target==matrix_valued: an object modeling ImmutableMatrix concept. -* When the point is outside of the mesh, the evaluation of the gf returns : +* When the point is outside of the mesh, the evaluation of the gf returns: * the evaluation of the high frequency tail if no_tail is not set. * 0 otherwise @@ -63,20 +63,20 @@ Data storage * If Target==scalar_valued : - * `data_t` : 1d array of complex. + * `data_t`: 1d array of complex. * g.data()(i) is the value of g for the i-th point of the mesh. * If Target==matrix_valued : - * `data_t` : 3d array (C ordered) of complex. + * `data_t`: 3d array (C ordered) of complex. * g.data()(i, range(), range()) is the value of g for the i-th point of the mesh. HDF5 storage convention --------------------------- -h5 tag : `ReTime` +h5 tag: `ReTime` Examples --------- diff --git a/doc/reference/c++/gf/gf_retime_0.cpp b/doc/reference/gfs/c++/gf_retime_0.cpp similarity index 100% rename from doc/reference/c++/gf/gf_retime_0.cpp rename to doc/reference/gfs/c++/gf_retime_0.cpp diff --git a/doc/reference/c++/gf/gf_special.rst b/doc/reference/gfs/c++/gf_special.rst similarity index 100% rename from doc/reference/c++/gf/gf_special.rst rename to doc/reference/gfs/c++/gf_special.rst diff --git a/doc/reference/c++/gf/gf_subscript.rst b/doc/reference/gfs/c++/gf_subscript.rst similarity index 94% rename from doc/reference/c++/gf/gf_subscript.rst rename to doc/reference/gfs/c++/gf_subscript.rst index 39d3daf7..3fb6d33c 100644 --- a/doc/reference/c++/gf/gf_subscript.rst +++ b/doc/reference/gfs/c++/gf_subscript.rst @@ -20,7 +20,7 @@ The operator [] is in charge of accessing the data of the Green function on the mesh. This is therefore a way to modify the Green function. -NB : This is valid for both the container (e.g. gf), and the view (e.g. gf_view). +NB: This is valid for both the container (e.g. gf), and the view (e.g. gf_view). .. _gf_subscript_index: diff --git a/doc/reference/c++/gf/implementation_notes.rst b/doc/reference/gfs/c++/implementation_notes.rst similarity index 100% rename from doc/reference/c++/gf/implementation_notes.rst rename to doc/reference/gfs/c++/implementation_notes.rst diff --git a/doc/reference/c++/gf/intro.rst b/doc/reference/gfs/c++/intro.rst similarity index 84% rename from doc/reference/c++/gf/intro.rst rename to doc/reference/gfs/c++/intro.rst index f3db05af..a231fb21 100644 --- a/doc/reference/c++/gf/intro.rst +++ b/doc/reference/gfs/c++/intro.rst @@ -6,7 +6,7 @@ Introduction ================= The `gf` container and its views `gf_view` and `gf_const_view` allows to store and manipulate -various Green functions, on various meshes, e.g. : +various Green functions, on various meshes, e.g.: * Matsubara frequency(ies), * Matsubara time(s), @@ -19,7 +19,7 @@ various Green functions, on various meshes, e.g. : Various free functions are also provided to handle transformations between various representation of a Green function, such as Fourier transforms. -This section is organized as follows : +This section is organized as follows: TO BE WRITTEN diff --git a/doc/reference/c++/gf/matsubara_freq_mesh.rst b/doc/reference/gfs/c++/matsubara_freq_mesh.rst similarity index 100% rename from doc/reference/c++/gf/matsubara_freq_mesh.rst rename to doc/reference/gfs/c++/matsubara_freq_mesh.rst diff --git a/doc/reference/c++/gf/matsubara_freq_mesh_0.cpp b/doc/reference/gfs/c++/matsubara_freq_mesh_0.cpp similarity index 100% rename from doc/reference/c++/gf/matsubara_freq_mesh_0.cpp rename to doc/reference/gfs/c++/matsubara_freq_mesh_0.cpp diff --git a/doc/reference/c++/gf/meshes.rst.old b/doc/reference/gfs/c++/meshes.rst.old similarity index 100% rename from doc/reference/c++/gf/meshes.rst.old rename to doc/reference/gfs/c++/meshes.rst.old diff --git a/doc/reference/c++/gf/plan.txt b/doc/reference/gfs/c++/plan.txt similarity index 100% rename from doc/reference/c++/gf/plan.txt rename to doc/reference/gfs/c++/plan.txt diff --git a/doc/reference/c++/gf/tail.rst b/doc/reference/gfs/c++/tail.rst similarity index 100% rename from doc/reference/c++/gf/tail.rst rename to doc/reference/gfs/c++/tail.rst diff --git a/doc/reference/c++/gf/tail_0.cpp b/doc/reference/gfs/c++/tail_0.cpp similarity index 100% rename from doc/reference/c++/gf/tail_0.cpp rename to doc/reference/gfs/c++/tail_0.cpp diff --git a/doc/reference/c++/gf/tail_1.cpp b/doc/reference/gfs/c++/tail_1.cpp similarity index 100% rename from doc/reference/c++/gf/tail_1.cpp rename to doc/reference/gfs/c++/tail_1.cpp diff --git a/doc/reference/c++/gf/tail_fit_0.cpp b/doc/reference/gfs/c++/tail_fit_0.cpp similarity index 100% rename from doc/reference/c++/gf/tail_fit_0.cpp rename to doc/reference/gfs/c++/tail_fit_0.cpp diff --git a/doc/reference/gfs/contents.rst b/doc/reference/gfs/contents.rst new file mode 100644 index 00000000..5a638ff3 --- /dev/null +++ b/doc/reference/gfs/contents.rst @@ -0,0 +1,14 @@ +Green's functions +=================== + + +.. warning:: + + This library is still alpha. API may evolve. Documentation still in progress. + + +.. toctree:: + :maxdepth: 2 + + py/contents + c++/contents diff --git a/doc/reference/python/green/block.rst b/doc/reference/gfs/py/block.rst similarity index 96% rename from doc/reference/python/green/block.rst rename to doc/reference/gfs/py/block.rst index 9e3f9f61..83a3d645 100644 --- a/doc/reference/python/green/block.rst +++ b/doc/reference/gfs/py/block.rst @@ -37,7 +37,7 @@ Block Green's functions support various simple operations. * compound operators, `+=`, `-=`, `*=`, `\=`: the RHS can be a Green's function of the same type or an expression -* arithmetic operations : `+`, `-`, `*`, `/`, e.g.:: +* arithmetic operations: `+`, `-`, `*`, `/`, e.g.:: g = g1 + 2*g2 @@ -55,13 +55,13 @@ The syntax is the regular python/numpy syntax, so a simple example will be enoug >>> from pytriqs.gf.local import * >>> g = GfImFreq(indices = [1,2,3], beta = 50, n_points = 1000, name = "imp") >>> g[1:3:,1:3] - GfImFreq imp : Beta = 50.000; IndicesL = [1, 2], IndicesR = [1, 2] + GfImFreq imp: Beta = 50.000; IndicesL = [1, 2], IndicesR = [1, 2] >>> g[1,1] - GfImFreq imp : Beta = 50.000; IndicesL = [1], IndicesR = [1] + GfImFreq imp: Beta = 50.000; IndicesL = [1], IndicesR = [1] >>> g[2:3,2:3] - GfImFreq imp : Beta = 50.000; IndicesL = [2], IndicesR = [2] + GfImFreq imp: Beta = 50.000; IndicesL = [2], IndicesR = [2] Assignment: <<= or = operator diff --git a/doc/reference/python/green/block/GfImFreq.rst b/doc/reference/gfs/py/block/GfImFreq.rst similarity index 95% rename from doc/reference/python/green/block/GfImFreq.rst rename to doc/reference/gfs/py/block/GfImFreq.rst index 200d8ac6..0b0d1270 100644 --- a/doc/reference/python/green/block/GfImFreq.rst +++ b/doc/reference/gfs/py/block/GfImFreq.rst @@ -8,7 +8,7 @@ Matsubara Green's function in imaginary frequencies (GfImFreq) ===================================================================================== This object stores a matrix valued Green function in imaginary frequencies -in the Matsubara formalism : +in the Matsubara formalism: .. math:: G_{\alpha \beta} (i \omega_n) \equiv \int_0^\beta G_{\alpha \beta} ( \tau) e^{i \omega_n \tau} @@ -26,7 +26,7 @@ Reference HDF5 data scheme ^^^^^^^^^^^^^^^^^^^^^^ -The GfImFreq (TRIQS_HDF5_data_scheme= "GfImFreq") is decomposed in the following objects : +The GfImFreq (TRIQS_HDF5_data_scheme= "GfImFreq") is decomposed in the following objects: ========================= =========================== =========================================================================== Name Type Meaning @@ -49,6 +49,6 @@ Note string Note Example --------------- -.. plot:: reference/python/green/block/green_imfreq.py +.. plot:: reference/gfs/py/block/green_imfreq.py :include-source: :scale: 70 diff --git a/doc/reference/python/green/block/GfImTime.rst b/doc/reference/gfs/py/block/GfImTime.rst similarity index 94% rename from doc/reference/python/green/block/GfImTime.rst rename to doc/reference/gfs/py/block/GfImTime.rst index e0e1efd2..9e5a49fe 100644 --- a/doc/reference/python/green/block/GfImTime.rst +++ b/doc/reference/gfs/py/block/GfImTime.rst @@ -8,7 +8,7 @@ Matsubara Green's function in imaginary time (GfImTime) ============================================================================== This object stores a matrix valued Green function in imaginary time -in the Matsubara formalism : +in the Matsubara formalism: .. math:: @@ -25,7 +25,7 @@ Reference HDF5 data scheme ^^^^^^^^^^^^^^^^^^^^^^ -The GfImTime (TRIQS_HDF5_data_scheme = "GfImTime") is decomposed in the following objects : +The GfImTime (TRIQS_HDF5_data_scheme = "GfImTime") is decomposed in the following objects: ========================= =========================== =========================================================================== Name Type Meaning @@ -44,7 +44,7 @@ Note string Note Example ------- -.. plot:: reference/python/green/block/green_imtime.py +.. plot:: reference/gfs/py/block/green_imtime.py :include-source: :scale: 70 diff --git a/doc/reference/python/green/block/GfLegendre.rst b/doc/reference/gfs/py/block/GfLegendre.rst similarity index 96% rename from doc/reference/python/green/block/GfLegendre.rst rename to doc/reference/gfs/py/block/GfLegendre.rst index 398537ae..fb9fa559 100644 --- a/doc/reference/python/green/block/GfLegendre.rst +++ b/doc/reference/gfs/py/block/GfLegendre.rst @@ -30,7 +30,7 @@ Reference HDF5 data scheme ^^^^^^^^^^^^^^^^^^ -The GfLegendre (TRIQS_HDF5_data_scheme= "GfLegendre") is decomposed in the following objects : +The GfLegendre (TRIQS_HDF5_data_scheme= "GfLegendre") is decomposed in the following objects: ========================= =========================== =========================================================================== Name Type Meaning @@ -49,7 +49,7 @@ Note string Note Example --------------- -.. plot:: reference/python/green/block/green_legendre.py +.. plot:: reference/gfs/py/block/green_legendre.py :include-source: :scale: 70 diff --git a/doc/reference/python/green/block/GfReFreq.rst b/doc/reference/gfs/py/block/GfReFreq.rst similarity index 94% rename from doc/reference/python/green/block/GfReFreq.rst rename to doc/reference/gfs/py/block/GfReFreq.rst index 6795929f..14eb0a4b 100644 --- a/doc/reference/python/green/block/GfReFreq.rst +++ b/doc/reference/gfs/py/block/GfReFreq.rst @@ -7,7 +7,7 @@ Retarded Green's function in real frequencies (GfReFreq) ===================================================================================== -This object stores a matrix valued Green function in real frequencies : +This object stores a matrix valued Green function in real frequencies: .. math:: G_{\alpha \beta} (\omega) \equiv \int_{-\infty}^{\infty} G_{\alpha \beta} ( t ) e^{-i \omega t} @@ -26,7 +26,7 @@ Reference HDF5 data scheme ^^^^^^^^^^^^^^^^^^^^^^ -The GfReFreq (TRIQS_HDF5_data_scheme = "GfReFreq") is decomposed in the following objects : +The GfReFreq (TRIQS_HDF5_data_scheme = "GfReFreq") is decomposed in the following objects: ========================= =========================== =========================================================================== Name Type Meaning @@ -46,7 +46,7 @@ Note string Note Examples --------------- -.. plot:: reference/python/green/block/green_refreq.py +.. plot:: reference/gfs/py/block/green_refreq.py :include-source: :scale: 70 @@ -57,6 +57,6 @@ The next example demonstrates how a real frequency Green's function can be reconstructed from an imaginary frequency counterpart using set_from_pade() method. -.. plot:: reference/python/green/block/green_pade.py +.. plot:: reference/gfs/py/block/green_pade.py :include-source: :scale: 70 diff --git a/doc/reference/python/green/block/GfReTime.rst b/doc/reference/gfs/py/block/GfReTime.rst similarity index 95% rename from doc/reference/python/green/block/GfReTime.rst rename to doc/reference/gfs/py/block/GfReTime.rst index 471d3708..a127a99e 100644 --- a/doc/reference/python/green/block/GfReTime.rst +++ b/doc/reference/gfs/py/block/GfReTime.rst @@ -7,7 +7,7 @@ Retarded Green's function in real time (GfReTime) ===================================================================================== -This object stores a retarded matrix valued Green function in real time : +This object stores a retarded matrix valued Green function in real time: .. math:: G_{\alpha \beta} (t) \equiv - \theta(t) <\{c_{\alpha}(t) c^{\dagger}_{\beta} (0)\}> @@ -23,7 +23,7 @@ Reference HDF5 data scheme ^^^^^^^^^^^^^^^^^^^^^^ -The GfReTime (TRIQS_HDF5_data_scheme = "GfReTime") is decomposed in the following objects : +The GfReTime (TRIQS_HDF5_data_scheme = "GfReTime") is decomposed in the following objects: ========================= =========================== =========================================================================== Name Type Meaning @@ -43,7 +43,7 @@ Note string Note Example --------------- -.. plot:: reference/python/green/block/green_retime.py +.. plot:: reference/gfs/py/block/green_retime.py :include-source: :scale: 70 diff --git a/doc/reference/python/green/block/green_imfreq.py b/doc/reference/gfs/py/block/green_imfreq.py similarity index 100% rename from doc/reference/python/green/block/green_imfreq.py rename to doc/reference/gfs/py/block/green_imfreq.py diff --git a/doc/reference/python/green/block/green_imtime.py b/doc/reference/gfs/py/block/green_imtime.py similarity index 100% rename from doc/reference/python/green/block/green_imtime.py rename to doc/reference/gfs/py/block/green_imtime.py diff --git a/doc/reference/python/green/block/green_legendre.py b/doc/reference/gfs/py/block/green_legendre.py similarity index 100% rename from doc/reference/python/green/block/green_legendre.py rename to doc/reference/gfs/py/block/green_legendre.py diff --git a/doc/reference/python/green/block/green_pade.py b/doc/reference/gfs/py/block/green_pade.py similarity index 100% rename from doc/reference/python/green/block/green_pade.py rename to doc/reference/gfs/py/block/green_pade.py diff --git a/doc/reference/python/green/block/green_refreq.py b/doc/reference/gfs/py/block/green_refreq.py similarity index 100% rename from doc/reference/python/green/block/green_refreq.py rename to doc/reference/gfs/py/block/green_refreq.py diff --git a/doc/reference/python/green/block/green_retime.py b/doc/reference/gfs/py/block/green_retime.py similarity index 100% rename from doc/reference/python/green/block/green_retime.py rename to doc/reference/gfs/py/block/green_retime.py diff --git a/doc/reference/python/green/green.rst b/doc/reference/gfs/py/contents.rst similarity index 95% rename from doc/reference/python/green/green.rst rename to doc/reference/gfs/py/contents.rst index 7dd942c1..683261ab 100644 --- a/doc/reference/python/green/green.rst +++ b/doc/reference/gfs/py/contents.rst @@ -6,8 +6,8 @@ .. _green: -Green's functions -================= +Python documentation +===================== Green's functions are among the most important objects when dealing with many-body problems. TRIQS makes it easy for you to manipulate them. Before diff --git a/doc/reference/python/green/descriptors.rst b/doc/reference/gfs/py/descriptors.rst similarity index 100% rename from doc/reference/python/green/descriptors.rst rename to doc/reference/gfs/py/descriptors.rst diff --git a/doc/reference/python/green/example.py b/doc/reference/gfs/py/example.py similarity index 100% rename from doc/reference/python/green/example.py rename to doc/reference/gfs/py/example.py diff --git a/doc/reference/python/green/fourier.py b/doc/reference/gfs/py/fourier.py similarity index 100% rename from doc/reference/python/green/fourier.py rename to doc/reference/gfs/py/fourier.py diff --git a/doc/reference/python/green/full.rst b/doc/reference/gfs/py/full.rst similarity index 91% rename from doc/reference/python/green/full.rst rename to doc/reference/gfs/py/full.rst index ac99d803..56613e8f 100644 --- a/doc/reference/python/green/full.rst +++ b/doc/reference/gfs/py/full.rst @@ -45,11 +45,11 @@ These names will be used when we try to access a particular block, for example : >>> G Green's Function composed of 2 blocks at inverse temperature Beta = 50.0: - GfImFreq eg : Beta = 50.000; IndicesL = ['eg1', 'eg2'], IndicesR = ['eg1', 'eg2'] - GfImFreq t2g : Beta = 50.000; IndicesL = ['t2g1', 't2g2', 't2g3'], IndicesR = ['t2g1', 't2g2', 't2g3'] + GfImFreq eg: Beta = 50.000; IndicesL = ['eg1', 'eg2'], IndicesR = ['eg1', 'eg2'] + GfImFreq t2g: Beta = 50.000; IndicesL = ['t2g1', 't2g2', 't2g3'], IndicesR = ['t2g1', 't2g2', 't2g3'] >>> G['eg'] - GfImFreq eg : Beta = 50.000; IndicesL = ['eg1', 'eg2'], IndicesR = ['eg1', 'eg2'] + GfImFreq eg: Beta = 50.000; IndicesL = ['eg1', 'eg2'], IndicesR = ['eg1', 'eg2'] Reference @@ -67,9 +67,9 @@ The full Green's functions support various simple operations, that are simply do .. note:: All these operations compute the array of data, but also, if present in the object, the high frequency expansion tail automatically. -* compound operators, `+=`, `-=`, `*=`, `\=` : RHS can be a Green's function of the same type or an expression +* compound operators, `+=`, `-=`, `*=`, `\=`: RHS can be a Green's function of the same type or an expression -* arithmetic operations : `+`, `-`, `*`, `/`, e.g. :: +* arithmetic operations: `+`, `-`, `*`, `/`, e.g. :: G = G1 + 2*G2 @@ -104,8 +104,8 @@ In the example above :: >>> for name, g in G: ... print name, g - eg GfImFreq eg : Beta = 50.000; IndicesL = ['eg1', 'eg2'], IndicesR = ['eg1', 'eg2'] - t2g GfImFreq t2g : Beta = 50.000; IndicesL = ['t2g1', 't2g2', 't2g3'], IndicesR = ['t2g1', 't2g2', 't2g3'] + eg GfImFreq eg: Beta = 50.000; IndicesL = ['eg1', 'eg2'], IndicesR = ['eg1', 'eg2'] + t2g GfImFreq t2g: Beta = 50.000; IndicesL = ['t2g1', 't2g2', 't2g3'], IndicesR = ['t2g1', 't2g2', 't2g3'] As a result :: @@ -204,7 +204,7 @@ HDF5 BlockGf are hdf-compatible with the following HDF5 data scheme -The BlockGf(TRIQS_HDF5_data_scheme = "BlockGf") is decomposed in the following objects : +The BlockGf(TRIQS_HDF5_data_scheme = "BlockGf") is decomposed in the following objects: ========================= =========================== =========================================================================== Name Type Meaning diff --git a/doc/reference/python/green/impinbath.py b/doc/reference/gfs/py/impinbath.py similarity index 100% rename from doc/reference/python/green/impinbath.py rename to doc/reference/gfs/py/impinbath.py diff --git a/doc/reference/python/green/legendre.py b/doc/reference/gfs/py/legendre.py similarity index 100% rename from doc/reference/python/green/legendre.py rename to doc/reference/gfs/py/legendre.py diff --git a/doc/reference/python/green/tail.rst b/doc/reference/gfs/py/tail.rst similarity index 98% rename from doc/reference/python/green/tail.rst rename to doc/reference/gfs/py/tail.rst index 21f0d727..03393fed 100644 --- a/doc/reference/python/green/tail.rst +++ b/doc/reference/gfs/py/tail.rst @@ -27,7 +27,7 @@ following members: larger than ``mask``, but all coefficients of indices greater than ``mask`` are irrelevant) - ``N1`` and ``N2`` give the size of each tail coefficient - :math:`\mathbf{a}_{i}` : :math:`N_1\times N_2` + :math:`\mathbf{a}_{i}`: :math:`N_1\times N_2` - ``size`` is the number of coefficients of the tail. - ``__getitem__``and ``__setitem__`` operators: access and set the ith coefficient :math:`\mathbf{a}_{i}` with the bracket operator diff --git a/doc/reference/python/green/transforms.rst b/doc/reference/gfs/py/transforms.rst similarity index 91% rename from doc/reference/python/green/transforms.rst rename to doc/reference/gfs/py/transforms.rst index 6da992d6..7d115c05 100644 --- a/doc/reference/python/green/transforms.rst +++ b/doc/reference/gfs/py/transforms.rst @@ -14,7 +14,7 @@ The command ``Fourier`` (``InverseFourier``) allows you to initialize a block Green's function defined in frequency (time) from a block Green's function defined in time (frequency). Here's a simple example: -.. plot:: reference/python/green/fourier.py +.. plot:: reference/gfs/py/fourier.py :include-source: :scale: 70 @@ -28,6 +28,6 @@ initialize a Matsubara Green's function (either in imaginary time or in imaginary frequencies) from a Legendre Green's function and conversely. Example: -.. plot:: reference/python/green/legendre.py +.. plot:: reference/gfs/py/legendre.py :include-source: :scale: 70 diff --git a/doc/reference/python/green/tutorial.rst b/doc/reference/gfs/py/tutorial.rst similarity index 94% rename from doc/reference/python/green/tutorial.rst rename to doc/reference/gfs/py/tutorial.rst index 476e0e0f..543aabd9 100644 --- a/doc/reference/python/green/tutorial.rst +++ b/doc/reference/gfs/py/tutorial.rst @@ -17,7 +17,7 @@ As a first example, we construct and plot the following Matsubara Green's functi This is done with the code : -.. plot:: reference/python/green/example.py +.. plot:: reference/gfs/py/example.py :include-source: :scale: 50 @@ -41,9 +41,9 @@ Matsubara frequencies. :lines: 6-6 This initializes the block with :math:`1/(i \omega_n + 0.5)`. -Two points are worth noting here : +Two points are worth noting here: -* The right hand side (RHS) of this statement is a *lazy* expression : its evaluation is delayed until +* The right hand side (RHS) of this statement is a *lazy* expression: its evaluation is delayed until it is needed to fill the Green function. * The funny *<<=* operator means "set from". It fills the Green function with the evaluation of the expression @@ -68,9 +68,9 @@ construct the corresponding 2x2 Green's function: \hat{G}^\mathrm{s+d} (i \omega_n) = \begin{pmatrix} i\omega_n - \epsilon_d & V \\ V & \Delta^{-1} \end{pmatrix}^{-1} -This is done with the code : +This is done with the code: -.. plot:: reference/python/green/impinbath.py +.. plot:: reference/gfs/py/impinbath.py :include-source: :scale: 70 diff --git a/doc/reference/hdf5/contents.rst b/doc/reference/hdf5/contents.rst new file mode 100644 index 00000000..109d312f --- /dev/null +++ b/doc/reference/hdf5/contents.rst @@ -0,0 +1,8 @@ +HDF5 +========= + + +.. warning:: + In construction! + + diff --git a/doc/reference/python/lattice/bravais.rst b/doc/reference/lattice_tools/bravais.rst similarity index 100% rename from doc/reference/python/lattice/bravais.rst rename to doc/reference/lattice_tools/bravais.rst diff --git a/doc/reference/python/lattice/lattice.rst b/doc/reference/lattice_tools/contents.rst similarity index 93% rename from doc/reference/python/lattice/lattice.rst rename to doc/reference/lattice_tools/contents.rst index 4684c5fc..d22df45e 100644 --- a/doc/reference/python/lattice/lattice.rst +++ b/doc/reference/lattice_tools/contents.rst @@ -4,7 +4,7 @@ .. _lattice: -Lattice Tools +Lattice tools ============= TRIQS comes with a couple of modules that allow to work with free fermions on Bravais lattices, with @@ -19,7 +19,7 @@ Introductory example .. literalinclude:: ex1.py :lines: 1-34 -Here, we take the simple square lattice in d=2 and compute the density of state. It produces : +Here, we take the simple square lattice in d=2 and compute the density of state. It produces: .. image:: ex1.png :width: 700 diff --git a/doc/reference/python/lattice/dos.rst b/doc/reference/lattice_tools/dos.rst similarity index 95% rename from doc/reference/python/lattice/dos.rst rename to doc/reference/lattice_tools/dos.rst index 6156f953..aaedf335 100644 --- a/doc/reference/python/lattice/dos.rst +++ b/doc/reference/lattice_tools/dos.rst @@ -8,7 +8,7 @@ Density of state and related tools ======================================= -The Density of state : DOS +The Density of state: DOS --------------------------------- .. autoclass:: pytriqs.dos.DOS diff --git a/doc/reference/python/lattice/ex1.png b/doc/reference/lattice_tools/ex1.png similarity index 100% rename from doc/reference/python/lattice/ex1.png rename to doc/reference/lattice_tools/ex1.png diff --git a/doc/reference/python/lattice/ex1.py b/doc/reference/lattice_tools/ex1.py similarity index 100% rename from doc/reference/python/lattice/ex1.py rename to doc/reference/lattice_tools/ex1.py diff --git a/doc/reference/python/lattice/ex2.py b/doc/reference/lattice_tools/ex2.py similarity index 100% rename from doc/reference/python/lattice/ex2.py rename to doc/reference/lattice_tools/ex2.py diff --git a/doc/reference/python/lattice/hilbert.rst b/doc/reference/lattice_tools/hilbert.rst similarity index 86% rename from doc/reference/python/lattice/hilbert.rst rename to doc/reference/lattice_tools/hilbert.rst index 189b3cf6..1fcc76ad 100644 --- a/doc/reference/python/lattice/hilbert.rst +++ b/doc/reference/lattice_tools/hilbert.rst @@ -17,14 +17,14 @@ TRIQS comes with a Hilbert transform. Let us look at an example: BL = BravaisLattice(units = [(1,0,0) , (0,1,0) ], orbital_positions= [(0,0,0)] ) t = -1.00 # First neighbour Hopping tp = 0.0*t # Second neighbour Hopping - hop= { (1,0) : [[ t]], - (-1,0) : [[ t]], - (0,1) : [[ t]], - (0,-1) : [[ t]], - (1,1) : [[ tp]], + hop= { (1,0) : [[ t]], + (-1,0): [[ t]], + (0,1) : [[ t]], + (0,-1): [[ t]], + (1,1) : [[ tp]], (-1,-1): [[ tp]], - (1,-1) : [[ tp]], - (-1,1) : [[ tp]]} + (1,-1): [[ tp]], + (-1,1): [[ tp]]} TB = TightBinding (BL, hop) d = dos(TB, n_kpts= 500, n_eps = 101, name = 'dos')[0] diff --git a/doc/reference/python/lattice/sumk.rst b/doc/reference/lattice_tools/sumk.rst similarity index 100% rename from doc/reference/python/lattice/sumk.rst rename to doc/reference/lattice_tools/sumk.rst diff --git a/doc/reference/python/lattice/tightbinding.rst b/doc/reference/lattice_tools/tightbinding.rst similarity index 100% rename from doc/reference/python/lattice/tightbinding.rst rename to doc/reference/lattice_tools/tightbinding.rst diff --git a/doc/reference/python/lattice/tightbinding_and_example.rst b/doc/reference/lattice_tools/tightbinding_and_example.rst similarity index 98% rename from doc/reference/python/lattice/tightbinding_and_example.rst rename to doc/reference/lattice_tools/tightbinding_and_example.rst index 32b87b01..e80b6bb0 100644 --- a/doc/reference/python/lattice/tightbinding_and_example.rst +++ b/doc/reference/lattice_tools/tightbinding_and_example.rst @@ -69,6 +69,6 @@ successively construct three Bravais lattices ``BL_1``, ``BL_2`` and three tight-binding models with hopping dictionaries ``hop_1``, ``hop_2`` and ``hop_4`` -.. plot:: reference/python/lattice/ex2.py +.. plot:: reference/lattice_tools/ex2.py :include-source: :scale: 70 diff --git a/doc/reference/c++/mctools/CMakeLists.txt b/doc/reference/montecarlo/CMakeLists.txt similarity index 100% rename from doc/reference/c++/mctools/CMakeLists.txt rename to doc/reference/montecarlo/CMakeLists.txt diff --git a/doc/reference/c++/mctools/intro.rst b/doc/reference/montecarlo/contents.rst similarity index 100% rename from doc/reference/c++/mctools/intro.rst rename to doc/reference/montecarlo/contents.rst diff --git a/doc/reference/c++/mctools/ising.rst b/doc/reference/montecarlo/ising.rst similarity index 93% rename from doc/reference/c++/mctools/ising.rst rename to doc/reference/montecarlo/ising.rst index a68cf1e7..36b8206f 100644 --- a/doc/reference/c++/mctools/ising.rst +++ b/doc/reference/montecarlo/ising.rst @@ -68,15 +68,15 @@ The move class should have three methods: `attempt()`, `accept()` and `reject()` site = RNG(config->N); // find the neighbours with periodicity - int left = (site==0 ? config->N-1 : site-1); - int right = (site==config->N-1 ? 0 : site+1); + int left = (site==0 ? config->N-1: site-1); + int right = (site==config->N-1 ? 0: site+1); // compute energy difference from field - delta_energy = (config->chain[site] ? 2 : -2) * config->field; + delta_energy = (config->chain[site] ? 2: -2) * config->field; // compute energy difference from J if(config->chain[left] == config->chain[right]) { - delta_energy += (config->chain[left] == config->chain[site] ? 4 : -4) * config->J; + delta_energy += (config->chain[left] == config->chain[site] ? 4: -4) * config->J; } // return Metroplis ratio @@ -85,7 +85,7 @@ The move class should have three methods: `attempt()`, `accept()` and `reject()` // if move accepted just flip site and update energy and magnetization double accept() { - config->M += (config->chain[site] ? -2 : 2); + config->M += (config->chain[site] ? -2: 2); config->chain[site] = !config->chain[site]; config->energy += delta_energy; @@ -116,7 +116,7 @@ The measure class has two methods, `accumulate` and `collect_results`:: configuration * config; double Z, M; - compute_m(configuration & config_) : config(&config_), Z(0), M(0) {} + compute_m(configuration & config_): config(&config_), Z(0), M(0) {} // accumulate Z and magnetization void accumulate(int sign) { @@ -173,7 +173,7 @@ The Monte-Carlo itself can now be written:: int n_warmup_cycles = 100000; std::string random_name = ""; int random_seed = 374982 + world.rank() * 273894; - int verbosity = (world.rank() == 0 ? 2 : 0); + int verbosity = (world.rank() == 0 ? 2: 0); // Construct a Monte Carlo loop triqs::mc_tools::mc_generic IsingMC(n_cycles, length_cycle, n_warmup_cycles, diff --git a/doc/reference/c++/mctools/loop.png b/doc/reference/montecarlo/loop.png similarity index 100% rename from doc/reference/c++/mctools/loop.png rename to doc/reference/montecarlo/loop.png diff --git a/doc/reference/c++/mctools/loop.rst b/doc/reference/montecarlo/loop.rst similarity index 100% rename from doc/reference/c++/mctools/loop.rst rename to doc/reference/montecarlo/loop.rst diff --git a/doc/reference/c++/mctools/overview.rst b/doc/reference/montecarlo/overview.rst similarity index 96% rename from doc/reference/c++/mctools/overview.rst rename to doc/reference/montecarlo/overview.rst index 5f6bdcb2..bb043002 100644 --- a/doc/reference/c++/mctools/overview.rst +++ b/doc/reference/montecarlo/overview.rst @@ -35,7 +35,7 @@ but obviously you would usually want to cut this into pieces for clarity:: struct configuration { int spin; double beta, h; - configuration(double beta_, double h_) : spin(-1), beta(beta_), h(h_) {} + configuration(double beta_, double h_): spin(-1), beta(beta_), h(h_) {} }; @@ -45,7 +45,7 @@ but obviously you would usually want to cut this into pieces for clarity:: configuration & config; - flip(configuration & config_) : config(config_) {} + flip(configuration & config_): config(config_) {} double attempt() { return std::exp(-2*config.spin*config.h*config.beta); } double accept() { config.spin *= -1; return 1.0; } @@ -59,7 +59,7 @@ but obviously you would usually want to cut this into pieces for clarity:: configuration & config; double Z, M; - compute_m(configuration & config_) : config(config_), Z(0), M(0) {} + compute_m(configuration & config_): config(config_), Z(0), M(0) {} void accumulate(double sign) { Z += sign; M += sign * config.spin; } @@ -92,7 +92,7 @@ but obviously you would usually want to cut this into pieces for clarity:: int n_warmup_cycles = 10000; std::string random_name = ""; int random_seed = 374982 + world.rank() * 273894; - int verbosity = (world.rank() == 0 ? 2 : 0); + int verbosity = (world.rank() == 0 ? 2: 0); // construct a Monte Carlo loop triqs::mc_tools::mc_generic SpinMC(n_cycles, length_cycle, n_warmup_cycles, @@ -145,7 +145,7 @@ called ``SpinMC``:: int n_warmup_cycles = 10000; std::string random_name = ""; int random_seed = 374982 + world.rank() * 273894; - int verbosity = (world.rank() == 0 ? 2 : 0); + int verbosity = (world.rank() == 0 ? 2: 0); triqs::mc_tools::mc_generic SpinMC(n_cycles, length_cycle, n_warmup_cycles, random_name, random_seed, verbosity); @@ -204,7 +204,7 @@ has three member functions that any move **must** have: ``attempt``, ``accept`` configuration & config; - flip(configuration & config_) : config(config_) {} + flip(configuration & config_): config(config_) {} double attempt() { return std::exp(-2*config.spin*config.h*config.beta); } double accept() { config.spin *= -1; return 1.0; } @@ -249,7 +249,7 @@ Let's look at ``compute_m``:: configuration & config; double Z, M; - compute_m(configuration & config_) : config(config_), Z(0), M(0) {} + compute_m(configuration & config_): config(config_), Z(0), M(0) {} void accumulate(double sign) { Z += sign; M += sign * config.spin; } diff --git a/doc/reference/c++/mctools/random.rst b/doc/reference/montecarlo/random.rst similarity index 100% rename from doc/reference/c++/mctools/random.rst rename to doc/reference/montecarlo/random.rst diff --git a/doc/reference/c++/mctools/reference.rst b/doc/reference/montecarlo/reference.rst similarity index 99% rename from doc/reference/c++/mctools/reference.rst rename to doc/reference/montecarlo/reference.rst index 952162b9..f2c3c93f 100644 --- a/doc/reference/c++/mctools/reference.rst +++ b/doc/reference/montecarlo/reference.rst @@ -7,7 +7,7 @@ Full reference Introduction & Motivations ************************** -* **Purpose** : +* **Purpose**: The purpose of this little class is too facilitate the writing and maintenance of Metropolis MonteCarlo algorithms, with several **advantages** : @@ -20,7 +20,7 @@ Introduction & Motivations * **Principle** The `mc_generic` class is a generic version of the algorithms, with `moves` and `measures`. - The user : + The user : - writes move classes, modelling the Move concept. - writes measure classes, modelling the Measure concepts. diff --git a/doc/reference/python/operators/operators.rst b/doc/reference/operators/contents.rst similarity index 85% rename from doc/reference/python/operators/operators.rst rename to doc/reference/operators/contents.rst index 4e900dc1..5cdcb10b 100644 --- a/doc/reference/python/operators/operators.rst +++ b/doc/reference/operators/contents.rst @@ -2,8 +2,8 @@ .. _operators: -The Operator class -=================== +Second-quantization operators for many-body Hamiltonians +=========================================================== The TRIQS solvers need to know several operators in order to solve the impurity problem. For example, they must know what the local Hamiltonian is, but also its @@ -26,7 +26,7 @@ A simple example print anti_commutator(C('up'),0.5*Cdag('down')) -Complete reference +Full reference ------------------------ .. autoclass:: pytriqs.operators.Operator diff --git a/doc/reference/python/data_analysis/contents.rst b/doc/reference/plotting_protocols/contents.rst similarity index 96% rename from doc/reference/python/data_analysis/contents.rst rename to doc/reference/plotting_protocols/contents.rst index 78b7935a..9d26df0f 100644 --- a/doc/reference/python/data_analysis/contents.rst +++ b/doc/reference/plotting_protocols/contents.rst @@ -4,7 +4,7 @@ .. _data_analysis: -Data analysis +Plotting protocols ################################### diff --git a/doc/reference/python/data_analysis/fit/demo1.py b/doc/reference/plotting_protocols/fit/demo1.py similarity index 100% rename from doc/reference/python/data_analysis/fit/demo1.py rename to doc/reference/plotting_protocols/fit/demo1.py diff --git a/doc/reference/python/data_analysis/fit/demo1_prepare.py b/doc/reference/plotting_protocols/fit/demo1_prepare.py similarity index 100% rename from doc/reference/python/data_analysis/fit/demo1_prepare.py rename to doc/reference/plotting_protocols/fit/demo1_prepare.py diff --git a/doc/reference/python/data_analysis/fit/fit.png b/doc/reference/plotting_protocols/fit/fit.png similarity index 100% rename from doc/reference/python/data_analysis/fit/fit.png rename to doc/reference/plotting_protocols/fit/fit.png diff --git a/doc/reference/python/data_analysis/fit/fit.rst b/doc/reference/plotting_protocols/fit/fit.rst similarity index 82% rename from doc/reference/python/data_analysis/fit/fit.rst rename to doc/reference/plotting_protocols/fit/fit.rst index 56838c9a..933b0309 100644 --- a/doc/reference/python/data_analysis/fit/fit.rst +++ b/doc/reference/plotting_protocols/fit/fit.rst @@ -10,7 +10,7 @@ A simple example Let us for example fit the Green function : -.. plot:: reference/python/data_analysis/fit/fit_test.py +.. plot:: reference/plotting_protocols/fit/fit_test.py :include-source: :scale: 70 @@ -41,8 +41,8 @@ scipy.leastsq). Example of fitfunc:: - linear = lambda X, a,b : a * X + b, r"$%f x + %f$" , (1,1) - quadratic = lambda X, a,b,c : (a * X + b)*Omega + c, r"$%f x^2 + %f x + %f$" , (0,1,1) + linear = lambda X, a,b : a * X + b, r"$%f x + %f$" , (1,1) + quadratic = lambda X, a,b,c: (a * X + b)*Omega + c, r"$%f x^2 + %f x + %f$" , (0,1,1) diff --git a/doc/reference/python/data_analysis/fit/fit_test.py b/doc/reference/plotting_protocols/fit/fit_test.py similarity index 100% rename from doc/reference/python/data_analysis/fit/fit_test.py rename to doc/reference/plotting_protocols/fit/fit_test.py diff --git a/doc/reference/python/data_analysis/hdf5/contents.rst b/doc/reference/plotting_protocols/hdf5/contents.rst similarity index 85% rename from doc/reference/python/data_analysis/hdf5/contents.rst rename to doc/reference/plotting_protocols/hdf5/contents.rst index a72ff669..626d826a 100644 --- a/doc/reference/python/data_analysis/hdf5/contents.rst +++ b/doc/reference/plotting_protocols/hdf5/contents.rst @@ -7,11 +7,11 @@ HDF5 interface In TRIQS, the main data storage format is `HDF5 `_ (Hierarchical Data Format v5). -The best picture of a hdf5 file is that of a **tree**, where : +The best picture of a hdf5 file is that of a **tree**, where: -* **Leaves** of the tree are basic types : scalars (int, long, double, string) and rectangular arrays of these scalars (any dimension : 1,2,3,4...). +* **Leaves** of the tree are basic types: scalars (int, long, double, string) and rectangular arrays of these scalars (any dimension: 1,2,3,4...). * Subtrees (branches) are called **groups** -* Groups and leaves have a name, so an element of the tree has naturally a **path** : +* Groups and leaves have a name, so an element of the tree has naturally a **path**: e.g. /group1/subgroup2/leaf1 and so on. * Any path (groups, leaves) can be optionally tagged with an **attribute**, in addition to their name, typically a string (or any scalar) @@ -37,7 +37,7 @@ Using HDF5 format has several advantages : * HDF5 can be read and written in **many langages** (python, C/C++, F90, etc), beyond TRIQS. One is not tied to a particular program. * Simple operations to explore and manipulate the tree are provided by simple unix shell commands (e.g. h5ls, h5diff). * It is a binary format, hence it is compact and has compression options. -* It is to a large extent **auto-documented** : the structure of the data speaks for itself. +* It is to a large extent **auto-documented**: the structure of the data speaks for itself. .. toctree:: :maxdepth: 5 diff --git a/doc/reference/python/data_analysis/hdf5/protocol1.rst b/doc/reference/plotting_protocols/hdf5/protocol1.rst similarity index 88% rename from doc/reference/python/data_analysis/hdf5/protocol1.rst rename to doc/reference/plotting_protocols/hdf5/protocol1.rst index 56ca0f0e..f50baff5 100644 --- a/doc/reference/python/data_analysis/hdf5/protocol1.rst +++ b/doc/reference/plotting_protocols/hdf5/protocol1.rst @@ -8,7 +8,7 @@ Principle ^^^^^^^^^^^^^^ The object which can be reduced to and reconstructed from a dictionary whose keys are strings, -and whose values are of one of the following types : +and whose values are of one of the following types: - a scalar (int, float, complex ....) - a numpy array of scalars @@ -40,11 +40,11 @@ A little example:: class Example: - def __init__(self,d,t) : + def __init__(self,d,t): self.d,self.t = d,t # some data - def __reduce_to_dict__(self) : - return {'d' : self.d, 't': self.t} + def __reduce_to_dict__(self): + return {'d': self.d, 't': self.t} @classmethod def __factory_from_dict__(cls,D) : @@ -54,7 +54,7 @@ A little example:: from pytriqs.archive.hdf_archive_schemes import register_class register_class (myclass) - # Testing it : + # Testing it: HDFArchive("myfile2.h5")['e'] = Example( [1,2,3], 56) @@ -77,8 +77,8 @@ Let us consider an object `Ob` of class `Cls`, interacting with and :py:class:`~ res = H[Name] - * The subgroup `S` of path `Root_of_H/Name` is explored. All objects are taken to build a dictionary `D` : name -> values. - This procedure is recursive : the hdf-compliant objects in the subgroup are rebuilt. + * The subgroup `S` of path `Root_of_H/Name` is explored. All objects are taken to build a dictionary `D`: name -> values. + This procedure is recursive: the hdf-compliant objects in the subgroup are rebuilt. * An attribute `HDF5_data_scheme` is searched for `S`. * If it is found and it corresponds to a registered class `Cls` : diff --git a/doc/reference/python/data_analysis/hdf5/protocol2.rst b/doc/reference/plotting_protocols/hdf5/protocol2.rst similarity index 100% rename from doc/reference/python/data_analysis/hdf5/protocol2.rst rename to doc/reference/plotting_protocols/hdf5/protocol2.rst diff --git a/doc/reference/python/data_analysis/hdf5/ref.rst b/doc/reference/plotting_protocols/hdf5/ref.rst similarity index 90% rename from doc/reference/python/data_analysis/hdf5/ref.rst rename to doc/reference/plotting_protocols/hdf5/ref.rst index 078675c0..56148a41 100644 --- a/doc/reference/python/data_analysis/hdf5/ref.rst +++ b/doc/reference/plotting_protocols/hdf5/ref.rst @@ -5,11 +5,11 @@ Reference manual The :class:`HDFArchive` class offers a convenient interface between the python objects and the HDF5 files, similar to a dictionary (or a shelve). -The module contains two classes : +The module contains two classes: -* :class:`HDFArchiveGroup` : operates on a subtree of the HDF5 file -* :class:`HDFArchive` : an :class:`HDFArchiveGroup` at the root path, with a simple constructor. -* :class:`HDFArchiveInert` : +* :class:`HDFArchiveGroup`: operates on a subtree of the HDF5 file +* :class:`HDFArchive`: an :class:`HDFArchiveGroup` at the root path, with a simple constructor. +* :class:`HDFArchiveInert`: Typically, one constructs an :class:`HDFArchive` explicitely, the :class:`HDFArchiveGroup` is created during operations, e.g.:: @@ -91,7 +91,7 @@ HDFArchiveGroup .. method:: update(d) - Add into the archive the content of any mapping *d* : keys->values, with + Add into the archive the content of any mapping *d*: keys->values, with hfd-compliant values. .. method:: values() @@ -124,11 +124,11 @@ HDFArchiveGroup For each named leaf (name,value) of the tree, it calls `f(name,value)`. - f should return : + f should return: - - `None` : no action is taken - - an `empty tuple` () : the leaf is removed from the tree - - an hdf-compliant value : the leaf is replaced by the value + - `None` : no action is taken + - an `empty tuple` () : the leaf is removed from the tree + - an hdf-compliant value : the leaf is replaced by the value HDFArchiveInert ======================================= @@ -165,7 +165,7 @@ Hdf-compliant objects ======================================= By definition, hdf-compliant objects are those which can be stored/retrieved in an :class:`HDFArchive`. -In order to be hdf-compliant, a class must : +In order to be hdf-compliant, a class must: * have a `HDF5_data_scheme` tag properly registered. * implement one of the two protocols described below. diff --git a/doc/reference/python/data_analysis/hdf5/tut_ex1.rst b/doc/reference/plotting_protocols/hdf5/tut_ex1.rst similarity index 92% rename from doc/reference/python/data_analysis/hdf5/tut_ex1.rst rename to doc/reference/plotting_protocols/hdf5/tut_ex1.rst index 089d04db..035ef9fa 100644 --- a/doc/reference/python/data_analysis/hdf5/tut_ex1.rst +++ b/doc/reference/plotting_protocols/hdf5/tut_ex1.rst @@ -1,7 +1,7 @@ .. _hdf5_tut_ex1: -Example 1 : A basic example +Example 1: A basic example -------------------------------- The simplest way to interact with HDF5 files is to use the TRIQS HDFArchive class, which @@ -19,7 +19,7 @@ Let us start with a very simple example :download:`[file] <./tut_ex1.py>`: S= R['S'] S['a'] = "a string" S['b'] = numpy.array([1,2,3]) - del R,S # closing the files (optional : file is closed when the references to R and subgroup are deleted) + del R,S # closing the files (optional: file is closed when the references to R and subgroup are deleted) Run this and say :: diff --git a/doc/reference/python/data_analysis/hdf5/tut_ex2.rst b/doc/reference/plotting_protocols/hdf5/tut_ex2.rst similarity index 94% rename from doc/reference/python/data_analysis/hdf5/tut_ex2.rst rename to doc/reference/plotting_protocols/hdf5/tut_ex2.rst index 08178566..d28b862c 100644 --- a/doc/reference/python/data_analysis/hdf5/tut_ex2.rst +++ b/doc/reference/plotting_protocols/hdf5/tut_ex2.rst @@ -1,7 +1,7 @@ .. _hdf5_tut_ex2: -Example 2 : A Green function +Example 2: A Green function ---------------------------------------------- What about more complex objects ? @@ -22,7 +22,7 @@ We can store a Green function in an hdf5 file: # Store the object G under the name 'g1' and mu R['g1'] = G R['mu'] = 1.29 - del R # closing the files (optional : file is closed when the R reference is deleted) + del R # closing the files (optional: file is closed when the R reference is deleted) Of course, we can retrieve G as easily: diff --git a/doc/reference/python/data_analysis/hdf5/tut_ex3.rst b/doc/reference/plotting_protocols/hdf5/tut_ex3.rst similarity index 89% rename from doc/reference/python/data_analysis/hdf5/tut_ex3.rst rename to doc/reference/plotting_protocols/hdf5/tut_ex3.rst index 164d452b..14428f48 100644 --- a/doc/reference/python/data_analysis/hdf5/tut_ex3.rst +++ b/doc/reference/plotting_protocols/hdf5/tut_ex3.rst @@ -1,7 +1,7 @@ .. _hdf5_tut_ex3: -Example 3 : Use the dictionary interface of the archive +Example 3: Use the dictionary interface of the archive -------------------------------------------------------------------- The archive is like a dictionary, persistent on disk. @@ -41,12 +41,12 @@ in order to plot only a few curves from a list :: keylist = ['D=1', 'D=3'] - for g in ( R[x] for x in keylist) : # use an iterator + for g in ( R[x] for x in keylist): # use an iterator oplot( (- 1/pi * g).imag, "-o", name = 'g' ) or if we want to add the names :: - for n,g in ( (x,R[x]) for x in keylist) : # use an iterator + for n,g in ( (x,R[x]) for x in keylist): # use an iterator oplot( (- 1/pi * g).imag, "-o", name = n ) The advantage of using an iterator is that the object is only retrieved from disk when needed. diff --git a/doc/reference/python/data_analysis/hdf5/tut_ex3b.png b/doc/reference/plotting_protocols/hdf5/tut_ex3b.png similarity index 100% rename from doc/reference/python/data_analysis/hdf5/tut_ex3b.png rename to doc/reference/plotting_protocols/hdf5/tut_ex3b.png diff --git a/doc/reference/python/data_analysis/hdf5/tut_ex3b.py b/doc/reference/plotting_protocols/hdf5/tut_ex3b.py similarity index 100% rename from doc/reference/python/data_analysis/hdf5/tut_ex3b.py rename to doc/reference/plotting_protocols/hdf5/tut_ex3b.py diff --git a/doc/reference/python/data_analysis/hdf5/tut_hdf1.png b/doc/reference/plotting_protocols/hdf5/tut_hdf1.png similarity index 100% rename from doc/reference/python/data_analysis/hdf5/tut_hdf1.png rename to doc/reference/plotting_protocols/hdf5/tut_hdf1.png diff --git a/doc/reference/python/data_analysis/hdf5/tutorial.rst b/doc/reference/plotting_protocols/hdf5/tutorial.rst similarity index 100% rename from doc/reference/python/data_analysis/hdf5/tutorial.rst rename to doc/reference/plotting_protocols/hdf5/tutorial.rst diff --git a/doc/reference/python/data_analysis/plotting/example.png b/doc/reference/plotting_protocols/plotting/example.png similarity index 100% rename from doc/reference/python/data_analysis/plotting/example.png rename to doc/reference/plotting_protocols/plotting/example.png diff --git a/doc/reference/python/data_analysis/plotting/example.py b/doc/reference/plotting_protocols/plotting/example.py similarity index 100% rename from doc/reference/python/data_analysis/plotting/example.py rename to doc/reference/plotting_protocols/plotting/example.py diff --git a/doc/reference/python/data_analysis/plotting/myobject.png b/doc/reference/plotting_protocols/plotting/myobject.png similarity index 100% rename from doc/reference/python/data_analysis/plotting/myobject.png rename to doc/reference/plotting_protocols/plotting/myobject.png diff --git a/doc/reference/python/data_analysis/plotting/myobject.py b/doc/reference/plotting_protocols/plotting/myobject.py similarity index 100% rename from doc/reference/python/data_analysis/plotting/myobject.py rename to doc/reference/plotting_protocols/plotting/myobject.py diff --git a/doc/reference/python/data_analysis/plotting/myobject2.png b/doc/reference/plotting_protocols/plotting/myobject2.png similarity index 100% rename from doc/reference/python/data_analysis/plotting/myobject2.png rename to doc/reference/plotting_protocols/plotting/myobject2.png diff --git a/doc/reference/python/data_analysis/plotting/myobject2.py b/doc/reference/plotting_protocols/plotting/myobject2.py similarity index 100% rename from doc/reference/python/data_analysis/plotting/myobject2.py rename to doc/reference/plotting_protocols/plotting/myobject2.py diff --git a/doc/reference/python/data_analysis/plotting/plotting.rst b/doc/reference/plotting_protocols/plotting/plotting.rst similarity index 80% rename from doc/reference/python/data_analysis/plotting/plotting.rst rename to doc/reference/plotting_protocols/plotting/plotting.rst index 341275a9..5a816ccd 100644 --- a/doc/reference/python/data_analysis/plotting/plotting.rst +++ b/doc/reference/plotting_protocols/plotting/plotting.rst @@ -21,7 +21,7 @@ but that can plot TRIQS objects (in fact *any* object, see below). We can reproduce the first example of the Green function tutorial: -.. plot:: reference/python/green/example.py +.. plot:: reference/gfs/py/example.py :include-source: :scale: 70 @@ -44,7 +44,7 @@ Multiple panels figures While one can use the regular matplotlib subfigure to make multi-panel figures, subplots makes it a bit more pythonic: -.. plot:: reference/python/data_analysis/plotting/example.py +.. plot:: reference/plotting_protocols/plotting/example.py :include-source: :scale: 70 @@ -72,22 +72,22 @@ See example below. :rtype: a list of dict representing one curve each. These dict must have the following fields: - * *xdata* : A 1-dimensional numpy array describing the x-axis points - * *ydata* : A 1-dimensional numpy array describing the y-axis points - * *label* : Label of the curve for the legend of the graph - * *type* : a string: currently "XY" [ optional] + * *xdata*: A 1-dimensional numpy array describing the x-axis points + * *ydata*: A 1-dimensional numpy array describing the y-axis points + * *label*: Label of the curve for the legend of the graph + * *type*: a string: currently "XY" [ optional] and optionally: - * *xlabel* : a label for the x axis. The last object plotted will overrule the previous ones. - * *ylabel* : a label for the y axis. The last object plotted will overrule the previous ones. + * *xlabel*: a label for the x axis. The last object plotted will overrule the previous ones. + * *ylabel*: a label for the y axis. The last object plotted will overrule the previous ones. Example ------- Here's a simple example to illustrate the protocol: -.. plot:: reference/python/data_analysis/plotting/myobject.py +.. plot:: reference/plotting_protocols/plotting/myobject.py :include-source: :scale: 70 @@ -98,7 +98,7 @@ A little bit more complex, with options. Note the use of the `pop method of dict `_, which returns and removes the entry from the dict (with a default value). -.. plot:: reference/python/data_analysis/plotting/myobject2.py +.. plot:: reference/plotting_protocols/plotting/myobject2.py :include-source: :scale: 70 diff --git a/doc/reference/python/data_analysis/provenance.rst b/doc/reference/plotting_protocols/provenance.rst similarity index 100% rename from doc/reference/python/data_analysis/provenance.rst rename to doc/reference/plotting_protocols/provenance.rst diff --git a/doc/reference/python/contents.rst b/doc/reference/python/contents.rst deleted file mode 100644 index 5eac5536..00000000 --- a/doc/reference/python/contents.rst +++ /dev/null @@ -1,18 +0,0 @@ - -Python -================ - -.. toctree:: - :maxdepth: 1 - - start/get_started - green/green - operators/operators - lattice/lattice - data_analysis/contents - random/random - parameters/parameters - wrap_generator/contents - - - diff --git a/doc/reference/python/parameters/parameters.rst b/doc/reference/python/parameters/parameters.rst deleted file mode 100644 index 770421c3..00000000 --- a/doc/reference/python/parameters/parameters.rst +++ /dev/null @@ -1,8 +0,0 @@ - -The Parameter class -=================== - -.. warning:: - - This documentation still has to be written - diff --git a/doc/reference/python/random/random.rst b/doc/reference/random_generator/contents.rst similarity index 91% rename from doc/reference/python/random/random.rst rename to doc/reference/random_generator/contents.rst index 0bb303c0..9c09f261 100644 --- a/doc/reference/python/random/random.rst +++ b/doc/reference/random_generator/contents.rst @@ -4,8 +4,8 @@ .. _random_generator: -Random generator class -====================== +Random number generators +========================== TRIQS exposes to python the random number generators used in C++, in the module ``RandomGenerator``. @@ -35,7 +35,7 @@ Example Here's a simple example showing how to use the generator. -.. plot:: reference/python/random/random.py +.. plot:: reference/random_generator/random.py :include-source: :scale: 70 diff --git a/doc/reference/python/random/random.py b/doc/reference/random_generator/random.py similarity index 100% rename from doc/reference/python/random/random.py rename to doc/reference/random_generator/random.py diff --git a/doc/reference/c++/statistics/CMakeLists.txt b/doc/reference/statistical_analysis/CMakeLists.txt similarity index 100% rename from doc/reference/c++/statistics/CMakeLists.txt rename to doc/reference/statistical_analysis/CMakeLists.txt diff --git a/doc/reference/c++/statistics/autocorrelation_time.rst b/doc/reference/statistical_analysis/autocorrelation_time.rst similarity index 100% rename from doc/reference/c++/statistics/autocorrelation_time.rst rename to doc/reference/statistical_analysis/autocorrelation_time.rst diff --git a/doc/reference/c++/statistics/binning.rst b/doc/reference/statistical_analysis/binning.rst similarity index 100% rename from doc/reference/c++/statistics/binning.rst rename to doc/reference/statistical_analysis/binning.rst diff --git a/doc/reference/c++/statistics/binning_0.cpp b/doc/reference/statistical_analysis/binning_0.cpp similarity index 100% rename from doc/reference/c++/statistics/binning_0.cpp rename to doc/reference/statistical_analysis/binning_0.cpp diff --git a/doc/reference/c++/statistics/contents.rst b/doc/reference/statistical_analysis/contents.rst similarity index 100% rename from doc/reference/c++/statistics/contents.rst rename to doc/reference/statistical_analysis/contents.rst diff --git a/doc/reference/c++/statistics/contents_0.cpp b/doc/reference/statistical_analysis/contents_0.cpp similarity index 100% rename from doc/reference/c++/statistics/contents_0.cpp rename to doc/reference/statistical_analysis/contents_0.cpp diff --git a/doc/reference/c++/statistics/ising2d.rst b/doc/reference/statistical_analysis/ising2d.rst similarity index 100% rename from doc/reference/c++/statistics/ising2d.rst rename to doc/reference/statistical_analysis/ising2d.rst diff --git a/doc/reference/c++/statistics/jackknife.rst b/doc/reference/statistical_analysis/jackknife.rst similarity index 100% rename from doc/reference/c++/statistics/jackknife.rst rename to doc/reference/statistical_analysis/jackknife.rst diff --git a/doc/reference/c++/statistics/jackknife_0.cpp b/doc/reference/statistical_analysis/jackknife_0.cpp similarity index 100% rename from doc/reference/c++/statistics/jackknife_0.cpp rename to doc/reference/statistical_analysis/jackknife_0.cpp diff --git a/doc/reference/c++/statistics/src b/doc/reference/statistical_analysis/src similarity index 100% rename from doc/reference/c++/statistics/src rename to doc/reference/statistical_analysis/src diff --git a/doc/reference/c++/using_the_lib/CMakeLists.txt b/doc/reference/using_the_lib/CMakeLists.txt similarity index 100% rename from doc/reference/c++/using_the_lib/CMakeLists.txt rename to doc/reference/using_the_lib/CMakeLists.txt diff --git a/doc/reference/c++/using_the_lib/contents.rst b/doc/reference/using_the_lib/contents.rst similarity index 63% rename from doc/reference/c++/using_the_lib/contents.rst rename to doc/reference/using_the_lib/contents.rst index 85478a2c..d38d57dd 100644 --- a/doc/reference/c++/using_the_lib/contents.rst +++ b/doc/reference/using_the_lib/contents.rst @@ -1,15 +1,17 @@ -Using triqs in C++ -=============================== +Using TRIQS in your own C++ project +==================================== + +.. warning:: + + Under construction... + The goal of these notes is to give a practical introduction to the development of a code that uses the TRIQS headers and libraries, including the proper `cmake` configuration files. -We will expose successively various cases : +We will expose successively various cases: -.. warning:: - - To be written. .. toctree:: :maxdepth: 2 diff --git a/doc/reference/c++/using_the_lib/profiling.rst b/doc/reference/using_the_lib/profiling.rst similarity index 90% rename from doc/reference/c++/using_the_lib/profiling.rst rename to doc/reference/using_the_lib/profiling.rst index 4bb69717..5cd6a76d 100644 --- a/doc/reference/c++/using_the_lib/profiling.rst +++ b/doc/reference/using_the_lib/profiling.rst @@ -1,5 +1,5 @@ -Profiling -########## +Profiling in C++ and Python +============================= One can easily profile c++ and Python code using `Google perftools `_. In Ubuntu: :: @@ -34,6 +34,6 @@ Then, analyze the results (stored in `my_test.py.prof`) with ``google-pprof``: : google-pprof --text my_test.py my_test.py.prof | less -Alternatively, to view the results more graphically, run : :: +Alternatively, to view the results more graphically, run: :: google-pprof --web my_test.py my_test.py.prof diff --git a/doc/reference/c++/using_the_lib/triqs_library.rst b/doc/reference/using_the_lib/triqs_library.rst similarity index 100% rename from doc/reference/c++/using_the_lib/triqs_library.rst rename to doc/reference/using_the_lib/triqs_library.rst diff --git a/doc/reference/c++/utilities/CMakeLists.txt b/doc/reference/utilities/CMakeLists.txt similarity index 100% rename from doc/reference/c++/utilities/CMakeLists.txt rename to doc/reference/utilities/CMakeLists.txt diff --git a/doc/reference/c++/utilities/contents.rst b/doc/reference/utilities/contents.rst similarity index 82% rename from doc/reference/c++/utilities/contents.rst rename to doc/reference/utilities/contents.rst index a6829aaa..3a4ded84 100644 --- a/doc/reference/c++/utilities/contents.rst +++ b/doc/reference/utilities/contents.rst @@ -1,4 +1,4 @@ -Utilities +Utilities: exceptions, tuple-tools, etc. ******************************************* .. highlight:: c diff --git a/doc/reference/c++/utilities/exceptions.rst b/doc/reference/utilities/exceptions.rst similarity index 94% rename from doc/reference/c++/utilities/exceptions.rst rename to doc/reference/utilities/exceptions.rst index 82b7ba54..70cfaedd 100644 --- a/doc/reference/c++/utilities/exceptions.rst +++ b/doc/reference/utilities/exceptions.rst @@ -10,7 +10,7 @@ Exceptions TRIQS defines special exceptions, with the following characteristics : * they derives from std::exceptions -* their .what() contains : +* their .what() contains: * the file and line where the exception occurred * an additionnal error message (see example below). The error behaves like a std::stringstream, @@ -21,7 +21,7 @@ TRIQS defines special exceptions, with the following characteristics : For uniformity, it is highly recommended to use these macros when developing for TRIQS. -Example : +Example: .. triqs_example:: ./exceptions_0.cpp The exception can of course be caught : diff --git a/doc/reference/c++/utilities/exceptions_0.cpp b/doc/reference/utilities/exceptions_0.cpp similarity index 100% rename from doc/reference/c++/utilities/exceptions_0.cpp rename to doc/reference/utilities/exceptions_0.cpp diff --git a/doc/reference/c++/utilities/exceptions_1.cpp b/doc/reference/utilities/exceptions_1.cpp similarity index 100% rename from doc/reference/c++/utilities/exceptions_1.cpp rename to doc/reference/utilities/exceptions_1.cpp diff --git a/doc/reference/c++/utilities/python_include_mess.rst b/doc/reference/utilities/python_include_mess.rst similarity index 98% rename from doc/reference/c++/utilities/python_include_mess.rst rename to doc/reference/utilities/python_include_mess.rst index 42617c45..4540aa15 100644 --- a/doc/reference/c++/utilities/python_include_mess.rst +++ b/doc/reference/utilities/python_include_mess.rst @@ -17,7 +17,7 @@ Very often compile warnings of Python can be seen, something like :: It is due to the fact that Python.h must be included before some other headers (cf python documentation). -Solutions : +Solutions: #. include first some triqs library, like arrays.hpp, gfs.hpp, etc... diff --git a/doc/reference/c++/utilities/tupletools.rst b/doc/reference/utilities/tupletools.rst similarity index 84% rename from doc/reference/c++/utilities/tupletools.rst rename to doc/reference/utilities/tupletools.rst index 3a76f78f..67fe64e1 100644 --- a/doc/reference/c++/utilities/tupletools.rst +++ b/doc/reference/utilities/tupletools.rst @@ -16,7 +16,7 @@ Various standard functional operations on tuple (which should be in the STL but apply ----------------------------------------------- -*Purpose* : `apply a function on a tuple of arguments` +*Purpose*: `apply a function on a tuple of arguments` Given a function object `f`, and its arguments stored in a tuple `t`, and we want to apply `f` on `t`. @@ -24,7 +24,7 @@ apply .. code-block:: python - def apply(f,t) : + def apply(f,t): return f(*t) *Synopsis* :: @@ -38,7 +38,7 @@ apply for_each ------------------------------------------------------------------------- -*Purpose* : `apply a function for each element of a tuple (in order)` +*Purpose*: `apply a function for each element of a tuple (in order)` Given a function object `f`, we want to apply it to all elements of a tuple `t`. @@ -47,7 +47,7 @@ for_each .. code-block:: python - def for_each(t,f) : + def for_each(t,f): for x in t: f(x) @@ -62,14 +62,14 @@ for_each for_each_zip ------------------------------------------------------------------------- -*Purpose* : `apply a function for each element of tuple zip (in order)` +*Purpose*: `apply a function for each element of tuple zip (in order)` *Python equivalent*: .. code-block:: python - def for_each(f,t0,t1) : + def for_each(f,t0,t1): for x0,x1 in itertools.zip(t0,t1): f(x0,x1) @@ -85,13 +85,13 @@ for_each_zip map ------------------------------------------------------------------------- -*Purpose* : `map a function on a tuple to create a new tuple` +*Purpose*: `map a function on a tuple to create a new tuple` *Python equivalent*: .. code-block:: python - def map(f,t) : + def map(f,t): return (f(x) for x in t) *Synopsis* :: @@ -109,13 +109,13 @@ map fold ------------------------------------------------------------------------- -*Purpose* : `reduction of a tuple with a function` +*Purpose*: `reduction of a tuple with a function` *Python equivalent*: .. code-block:: python - def fold(f,t,r) : + def fold(f,t,r): return reduce(f,t,r) *Synopsis* :: @@ -140,25 +140,25 @@ fold *Parameters* : - * f : a callable object of signature :: + * f: a callable object of signature :: f(x, r) -> r' (1) f(x, y, r) -> r' (2) The return type of f must be a valid last parameter for f (at least for one overload). - * t : a tuple + * t: a tuple - * t0,t1 : two tuples of the same size + * t0,t1: two tuples of the same size - * r : anything that can be a last parameter for f. + * r: anything that can be a last parameter for f. * Precondition: everything so that the resulting expression is valid (in particular, f must be called on each tuple elements, with its return type as last parameter. .. warning:: - The type of the result is not necessarly R : it is automatically deduced from this expression. Cf example. + The type of the result is not necessarly R: it is automatically deduced from this expression. Cf example. *Example* : @@ -168,7 +168,7 @@ fold reverse ------------------------------------------------------------------------- -*Purpose* : `lazy reverse of a tuple` +*Purpose*: `lazy reverse of a tuple` *Python equivalent*: None. @@ -201,14 +201,14 @@ reverse called_on_tuple ------------------------------------------------------------------------- -*Purpose* : `Adapting a function to call with a tuple argument and flatten it` +*Purpose*: `Adapting a function to call with a tuple argument and flatten it` *Python equivalent*: .. code-block:: python - def called_on_tuple(f) : - return lambda x : f(*x) + def called_on_tuple(f): + return lambda x: f(*x) *Synopsis* :: diff --git a/doc/reference/c++/utilities/tupletools_0.cpp b/doc/reference/utilities/tupletools_0.cpp similarity index 100% rename from doc/reference/c++/utilities/tupletools_0.cpp rename to doc/reference/utilities/tupletools_0.cpp diff --git a/doc/reference/c++/utilities/tupletools_1.cpp b/doc/reference/utilities/tupletools_1.cpp similarity index 100% rename from doc/reference/c++/utilities/tupletools_1.cpp rename to doc/reference/utilities/tupletools_1.cpp diff --git a/doc/reference/c++/utilities/tupletools_2.cpp b/doc/reference/utilities/tupletools_2.cpp similarity index 100% rename from doc/reference/c++/utilities/tupletools_2.cpp rename to doc/reference/utilities/tupletools_2.cpp diff --git a/doc/reference/c++/utilities/tupletools_3.cpp b/doc/reference/utilities/tupletools_3.cpp similarity index 100% rename from doc/reference/c++/utilities/tupletools_3.cpp rename to doc/reference/utilities/tupletools_3.cpp diff --git a/doc/reference/c++/utilities/tupletools_4.cpp b/doc/reference/utilities/tupletools_4.cpp similarity index 100% rename from doc/reference/c++/utilities/tupletools_4.cpp rename to doc/reference/utilities/tupletools_4.cpp diff --git a/doc/reference/c++/utilities/tupletools_called.cpp b/doc/reference/utilities/tupletools_called.cpp similarity index 100% rename from doc/reference/c++/utilities/tupletools_called.cpp rename to doc/reference/utilities/tupletools_called.cpp diff --git a/doc/reference/c++/utilities/tupletools_reverse.cpp b/doc/reference/utilities/tupletools_reverse.cpp similarity index 100% rename from doc/reference/c++/utilities/tupletools_reverse.cpp rename to doc/reference/utilities/tupletools_reverse.cpp diff --git a/doc/reference/python/wrap_generator/cfunction.rst b/doc/reference/wrap_generator/cfunction.rst similarity index 100% rename from doc/reference/python/wrap_generator/cfunction.rst rename to doc/reference/wrap_generator/cfunction.rst diff --git a/doc/reference/python/wrap_generator/class.rst b/doc/reference/wrap_generator/class.rst similarity index 100% rename from doc/reference/python/wrap_generator/class.rst rename to doc/reference/wrap_generator/class.rst diff --git a/doc/reference/python/wrap_generator/contents.rst b/doc/reference/wrap_generator/contents.rst similarity index 100% rename from doc/reference/python/wrap_generator/contents.rst rename to doc/reference/wrap_generator/contents.rst diff --git a/doc/reference/python/wrap_generator/module.rst b/doc/reference/wrap_generator/module.rst similarity index 100% rename from doc/reference/python/wrap_generator/module.rst rename to doc/reference/wrap_generator/module.rst diff --git a/doc/tutorials/c++/CMakeLists.txt b/doc/tour/CMakeLists.txt similarity index 92% rename from doc/tutorials/c++/CMakeLists.txt rename to doc/tour/CMakeLists.txt index 917a5baf..bb97623f 100644 --- a/doc/tutorials/c++/CMakeLists.txt +++ b/doc/tour/CMakeLists.txt @@ -1,2 +1 @@ all_tests() - diff --git a/doc/tutorials/python/aim_plot.png b/doc/tour/aim_plot.png similarity index 100% rename from doc/tutorials/python/aim_plot.png rename to doc/tour/aim_plot.png diff --git a/doc/tutorials/python/aim_plot.py b/doc/tour/aim_plot.py similarity index 100% rename from doc/tutorials/python/aim_plot.py rename to doc/tour/aim_plot.py diff --git a/doc/tutorials/python/contents.rst b/doc/tour/contents.rst similarity index 100% rename from doc/tutorials/python/contents.rst rename to doc/tour/contents.rst diff --git a/doc/tutorials/python/ctqmc.rst b/doc/tour/ctqmc.rst similarity index 95% rename from doc/tutorials/python/ctqmc.rst rename to doc/tour/ctqmc.rst index cb8c4ee1..9dfaa780 100644 --- a/doc/tutorials/python/ctqmc.rst +++ b/doc/tour/ctqmc.rst @@ -56,8 +56,8 @@ is stored in the :ref:`HDF5 format`. # Run the solver. The result will be in S.G S.solve(H_local = U * N('up',1) * N('down',1), # Local Hamiltonian quantum_numbers = { # Quantum Numbers - 'Nup' : N('up',1), # Operators commuting with H_Local - 'Ndown' : N('down',1) }, + 'Nup': N('up',1), # Operators commuting with H_Local + 'Ndown': N('down',1) }, n_cycles = 500000, # Number of QMC cycles length_cycle = 200, # Length of one cycle n_warmup_cycles = 10000, # Warmup cycles @@ -65,7 +65,7 @@ is stored in the :ref:`HDF5 format`. random_name = 'mt19937', # Name of the random number generator use_segment_picture = True, # Use the segment picture measured_operators = { # Operators to be averaged - 'Nimp' : N('up',1)+N('down',1) } + 'Nimp': N('up',1)+N('down',1) } ) # Save the results in an hdf5 file (only on the master node) diff --git a/doc/tutorials/python/dmft.py b/doc/tour/dmft.py similarity index 100% rename from doc/tutorials/python/dmft.py rename to doc/tour/dmft.py diff --git a/doc/tutorials/python/dmft.rst b/doc/tour/dmft.rst similarity index 94% rename from doc/tutorials/python/dmft.rst rename to doc/tour/dmft.rst index b995f409..8c31b17a 100644 --- a/doc/tutorials/python/dmft.rst +++ b/doc/tour/dmft.rst @@ -51,7 +51,7 @@ Here is a complete program doing this plain-vanilla DMFT on a half-filled one-b # Run the solver S.solve(H_local = U * N('up',1) * N('down',1), # Local Hamiltonian - quantum_numbers = { 'Nup' : N('up',1), 'Ndown' : N('down',1) }, # Quantum Numbers (operators commuting with H_Local) + quantum_numbers = { 'Nup': N('up',1), 'Ndown': N('down',1) }, # Quantum Numbers (operators commuting with H_Local) n_cycles = 5000, # Number of QMC cycles length_cycle = 200, # Length of a cycle n_warmup_cycles = 1000, # How many warmup cycles @@ -66,6 +66,6 @@ Here is a complete program doing this plain-vanilla DMFT on a half-filled one-b del R # Here we would usually write some convergence test - # if Converged : break + # if Converged: break diff --git a/doc/reference/python/start/get_started.rst b/doc/tour/getting_started/get_started.rst similarity index 100% rename from doc/reference/python/start/get_started.rst rename to doc/tour/getting_started/get_started.rst diff --git a/doc/tutorials/python/green.rst b/doc/tour/green.rst similarity index 91% rename from doc/tutorials/python/green.rst rename to doc/tour/green.rst index f1cfd925..f32b7df1 100644 --- a/doc/tutorials/python/green.rst +++ b/doc/tour/green.rst @@ -16,10 +16,10 @@ The Green's function is generated using classes of the ``gf.local`` module by se :math:`\left[\hat{G}^\mathrm{s+d}\right]^{-1}` and inverting it. Finally, the obtained bath and impurity densities of states are plotted using the TRIQS function ``oplot``: -.. plot:: reference/python/green/impinbath.py +.. plot:: reference/gfs/py/impinbath.py :include-source: :scale: 70 -You will find more information on the local Green's function implementation in TRIQS in :doc:`the corresponding chapter of the manual <../../reference/python/green/green>` +You will find more information on the local Green's function implementation in TRIQS in :doc:`the corresponding chapter of the manual <../../reference/gfs/py/green>` diff --git a/doc/tutorials/python/ipt.rst b/doc/tour/ipt.rst similarity index 98% rename from doc/tutorials/python/ipt.rst rename to doc/tour/ipt.rst index 5ee52c90..46e29fbb 100644 --- a/doc/tutorials/python/ipt.rst +++ b/doc/tour/ipt.rst @@ -72,7 +72,7 @@ Visualization of a Mott transition We can now use this solver to run DMFT calculations and scan a range of values of :math:`U`. -.. plot:: tutorials/python/ipt_full.py +.. plot:: tour/ipt_full.py :include-source: :scale: 70 diff --git a/doc/tutorials/python/ipt_dmft.py b/doc/tour/ipt_dmft.py similarity index 100% rename from doc/tutorials/python/ipt_dmft.py rename to doc/tour/ipt_dmft.py diff --git a/doc/tutorials/python/ipt_full.py b/doc/tour/ipt_full.py similarity index 100% rename from doc/tutorials/python/ipt_full.py rename to doc/tour/ipt_full.py diff --git a/doc/tutorials/python/ipt_solver.py b/doc/tour/ipt_solver.py similarity index 100% rename from doc/tutorials/python/ipt_solver.py rename to doc/tour/ipt_solver.py diff --git a/doc/tutorials/python/mott.gif b/doc/tour/mott.gif similarity index 100% rename from doc/tutorials/python/mott.gif rename to doc/tour/mott.gif diff --git a/doc/tutorials/python/tight_binding.rst b/doc/tour/tight_binding.rst similarity index 81% rename from doc/tutorials/python/tight_binding.rst rename to doc/tour/tight_binding.rst index e4dad6f5..dff8d3af 100644 --- a/doc/tutorials/python/tight_binding.rst +++ b/doc/tour/tight_binding.rst @@ -9,9 +9,9 @@ neighbour hopping using the ``BravaisLattice`` class of TRIQS, compute its density of states (DOS) and then plot it by using again the ``oplot`` function. -.. plot:: reference/python/lattice/ex1.py +.. plot:: reference/lattice_tools/ex1.py :include-source: :scale: 70 -More information on the lattice tools implemeted in TRIQS can be :doc:`found here <../../reference/python/lattice/lattice>` +More information on the lattice tools implemeted in TRIQS can be :doc:`found here <../../reference/lattice_tools/lattice>` diff --git a/doc/tutorials/CMakeLists.txt b/doc/tutorials/CMakeLists.txt index bcad4d4b..917a5baf 100644 --- a/doc/tutorials/CMakeLists.txt +++ b/doc/tutorials/CMakeLists.txt @@ -1,2 +1,2 @@ -add_subdirectory(c++) +all_tests() diff --git a/doc/tutorials/c++/array_tutorial.rst b/doc/tutorials/array_tutorial.rst similarity index 98% rename from doc/tutorials/c++/array_tutorial.rst rename to doc/tutorials/array_tutorial.rst index 0ead81d1..d2505b0d 100644 --- a/doc/tutorials/c++/array_tutorial.rst +++ b/doc/tutorials/array_tutorial.rst @@ -1,4 +1,4 @@ -Examples of use of arrays +Multidimensional arrays ========================== .. highlight:: c diff --git a/doc/tutorials/c++/array_tutorial_0.cpp b/doc/tutorials/array_tutorial_0.cpp similarity index 100% rename from doc/tutorials/c++/array_tutorial_0.cpp rename to doc/tutorials/array_tutorial_0.cpp diff --git a/doc/tutorials/c++/array_tutorial_1.cpp b/doc/tutorials/array_tutorial_1.cpp similarity index 100% rename from doc/tutorials/c++/array_tutorial_1.cpp rename to doc/tutorials/array_tutorial_1.cpp diff --git a/doc/tutorials/c++/array_tutorial_2.cpp b/doc/tutorials/array_tutorial_2.cpp similarity index 100% rename from doc/tutorials/c++/array_tutorial_2.cpp rename to doc/tutorials/array_tutorial_2.cpp diff --git a/doc/tutorials/c++/array_tutorial_3.cpp b/doc/tutorials/array_tutorial_3.cpp similarity index 100% rename from doc/tutorials/c++/array_tutorial_3.cpp rename to doc/tutorials/array_tutorial_3.cpp diff --git a/doc/tutorials/c++/array_tutorial_4.cpp b/doc/tutorials/array_tutorial_4.cpp similarity index 100% rename from doc/tutorials/c++/array_tutorial_4.cpp rename to doc/tutorials/array_tutorial_4.cpp diff --git a/doc/tutorials/c++/array_tutorial_5.cpp b/doc/tutorials/array_tutorial_5.cpp similarity index 100% rename from doc/tutorials/c++/array_tutorial_5.cpp rename to doc/tutorials/array_tutorial_5.cpp diff --git a/doc/tutorials/c++/array_tutorial_6.cpp b/doc/tutorials/array_tutorial_6.cpp similarity index 100% rename from doc/tutorials/c++/array_tutorial_6.cpp rename to doc/tutorials/array_tutorial_6.cpp diff --git a/doc/tutorials/c++/array_tutorial_7.cpp b/doc/tutorials/array_tutorial_7.cpp similarity index 100% rename from doc/tutorials/c++/array_tutorial_7.cpp rename to doc/tutorials/array_tutorial_7.cpp diff --git a/doc/tutorials/c++/contents.rst b/doc/tutorials/contents.rst similarity index 100% rename from doc/tutorials/c++/contents.rst rename to doc/tutorials/contents.rst diff --git a/doc/tutorials/c++/det_manip_tutorial.rst b/doc/tutorials/det_manip_tutorial.rst similarity index 89% rename from doc/tutorials/c++/det_manip_tutorial.rst rename to doc/tutorials/det_manip_tutorial.rst index 84579f3f..10011593 100644 --- a/doc/tutorials/c++/det_manip_tutorial.rst +++ b/doc/tutorials/det_manip_tutorial.rst @@ -1,5 +1,5 @@ -Det_manip cookbook -=================== +Manipulation of determinants for Continuous-Time Monte-Carlo algorithms +======================================================================= .. highlight:: c diff --git a/doc/tutorials/c++/det_manip_tutorial_0.cpp b/doc/tutorials/det_manip_tutorial_0.cpp similarity index 100% rename from doc/tutorials/c++/det_manip_tutorial_0.cpp rename to doc/tutorials/det_manip_tutorial_0.cpp diff --git a/doc/tutorials/c++/det_manip_tutorial_1.cpp b/doc/tutorials/det_manip_tutorial_1.cpp similarity index 100% rename from doc/tutorials/c++/det_manip_tutorial_1.cpp rename to doc/tutorials/det_manip_tutorial_1.cpp diff --git a/doc/tutorials/c++/det_manip_tutorial_2.cpp b/doc/tutorials/det_manip_tutorial_2.cpp similarity index 100% rename from doc/tutorials/c++/det_manip_tutorial_2.cpp rename to doc/tutorials/det_manip_tutorial_2.cpp diff --git a/doc/tutorials/c++/det_manip_tutorial_3.cpp b/doc/tutorials/det_manip_tutorial_3.cpp similarity index 100% rename from doc/tutorials/c++/det_manip_tutorial_3.cpp rename to doc/tutorials/det_manip_tutorial_3.cpp diff --git a/doc/tutorials/c++/det_manip_tutorial_4.cpp b/doc/tutorials/det_manip_tutorial_4.cpp similarity index 100% rename from doc/tutorials/c++/det_manip_tutorial_4.cpp rename to doc/tutorials/det_manip_tutorial_4.cpp diff --git a/doc/tutorials/c++/det_manip_tutorial_5.cpp b/doc/tutorials/det_manip_tutorial_5.cpp similarity index 100% rename from doc/tutorials/c++/det_manip_tutorial_5.cpp rename to doc/tutorials/det_manip_tutorial_5.cpp diff --git a/doc/tutorials/c++/det_manip_tutorial_6.cpp b/doc/tutorials/det_manip_tutorial_6.cpp similarity index 100% rename from doc/tutorials/c++/det_manip_tutorial_6.cpp rename to doc/tutorials/det_manip_tutorial_6.cpp diff --git a/doc/tutorials/c++/gfs_tutorial.rst b/doc/tutorials/gfs_tutorial.rst similarity index 98% rename from doc/tutorials/c++/gfs_tutorial.rst rename to doc/tutorials/gfs_tutorial.rst index c0472ad7..e4c1317d 100644 --- a/doc/tutorials/c++/gfs_tutorial.rst +++ b/doc/tutorials/gfs_tutorial.rst @@ -1,4 +1,4 @@ -Green function cookbook +Green's functions ======================= .. highlight:: c diff --git a/doc/tutorials/c++/gfs_tutorial_0.cpp b/doc/tutorials/gfs_tutorial_0.cpp similarity index 100% rename from doc/tutorials/c++/gfs_tutorial_0.cpp rename to doc/tutorials/gfs_tutorial_0.cpp diff --git a/doc/tutorials/c++/gfs_tutorial_1.cpp b/doc/tutorials/gfs_tutorial_1.cpp similarity index 100% rename from doc/tutorials/c++/gfs_tutorial_1.cpp rename to doc/tutorials/gfs_tutorial_1.cpp diff --git a/doc/tutorials/c++/gfs_tutorial_2.cpp b/doc/tutorials/gfs_tutorial_2.cpp similarity index 100% rename from doc/tutorials/c++/gfs_tutorial_2.cpp rename to doc/tutorials/gfs_tutorial_2.cpp diff --git a/doc/tutorials/c++/gfs_tutorial_3.cpp b/doc/tutorials/gfs_tutorial_3.cpp similarity index 100% rename from doc/tutorials/c++/gfs_tutorial_3.cpp rename to doc/tutorials/gfs_tutorial_3.cpp diff --git a/doc/tutorials/c++/gfs_tutorial_4.cpp b/doc/tutorials/gfs_tutorial_4.cpp similarity index 100% rename from doc/tutorials/c++/gfs_tutorial_4.cpp rename to doc/tutorials/gfs_tutorial_4.cpp diff --git a/doc/tutorials/c++/gfs_tutorial_5.cpp b/doc/tutorials/gfs_tutorial_5.cpp similarity index 100% rename from doc/tutorials/c++/gfs_tutorial_5.cpp rename to doc/tutorials/gfs_tutorial_5.cpp diff --git a/doc/tutorials/c++/gfs_tutorial_6.cpp b/doc/tutorials/gfs_tutorial_6.cpp similarity index 100% rename from doc/tutorials/c++/gfs_tutorial_6.cpp rename to doc/tutorials/gfs_tutorial_6.cpp