2013-08-27 19:17:17 +02:00
|
|
|
.. highlight:: c
|
|
|
|
|
|
|
|
.. _arr_play_concept:
|
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
2014-10-17 18:15:19 +02:00
|
|
|
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
|
2014-10-17 18:15:19 +02:00
|
|
|
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
|
2014-10-17 18:15:19 +02:00
|
|
|
* 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
|
2014-10-17 18:15:19 +02:00
|
|
|
a lazy object modelling :ref:`ImmutableCuboidArray` concept, with the domain built from the ranges:
|
2013-08-27 19:17:17 +02:00
|
|
|
|
|
|
|
|
2014-10-17 18:15:19 +02:00
|
|
|
**Example**:
|
2013-08-27 19:17:17 +02:00
|
|
|
|
2014-05-31 19:12:21 +02:00
|
|
|
.. triqs_example:: ./play_with_concept_0.cpp
|