3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-01 19:53:45 +01:00
dft_tools/doc/reference/arrays/play_with_concept.rst

38 lines
1.0 KiB
ReStructuredText
Raw Normal View History

2013-08-27 19:17:17 +02:00
.. highlight:: c
.. _arr_play_concept:
.. warning::
This part is alpha: work in progress. May change at any time.
2013-08-27 19:17:17 +02:00
Using basic concepts
###########################################
make_immutable_array
-------------------------------
**Synopsis**::
template<typename Expr, int ... ph> auto make_immutable_array(Expr const &, clef::pair<ph,range> ...); (1)
template<typename Function> auto make_immutable_array(Function, range ...); (2)
* (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:
2013-08-27 19:17:17 +02:00
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.
2013-08-27 19:17:17 +02:00
* (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:
2013-08-27 19:17:17 +02:00
**Example**:
2013-08-27 19:17:17 +02:00
.. triqs_example:: ./play_with_concept_0.cpp