2013-07-17 19:24:07 +02:00
|
|
|
.. _Shape:
|
|
|
|
|
2013-08-22 16:55:51 +02:00
|
|
|
Shape & dimensions
|
2013-07-17 19:24:07 +02:00
|
|
|
==================================
|
|
|
|
|
2013-08-22 16:55:51 +02:00
|
|
|
**Synopsis**:
|
2013-07-17 19:24:07 +02:00
|
|
|
|
2013-08-22 16:55:51 +02:00
|
|
|
.. code-block:: c
|
2013-07-17 19:24:07 +02:00
|
|
|
|
2013-08-22 16:55:51 +02:00
|
|
|
template <ImmutableArray A> mini_vector<size_t,R> get_shape(A const &); // R is the rank of A
|
|
|
|
|
|
|
|
template<ImmutableArray A> size_t first_dim (A const & x);
|
|
|
|
template<ImmutableArray A> size_t second_dim (A const & x);
|
|
|
|
template<ImmutableArray A> size_t third_dim (A const & x);
|
|
|
|
template<ImmutableArray A> size_t fourth_dim (A const & x);
|
|
|
|
template<ImmutableArray A> size_t fifth_dim (A const & x);
|
|
|
|
template<ImmutableArray A> size_t sixth_dim (A const & x);
|
|
|
|
template<ImmutableArray A> size_t seventh_dim (A const & x);
|
2013-07-17 19:24:07 +02:00
|
|
|
|
|
|
|
|
2013-08-22 16:55:51 +02:00
|
|
|
The shape and dimensions of any object modeling :ref:`ImmutableCuboidArray` is obtained using get_shape and xxx_dim functions :
|
2013-07-17 19:24:07 +02:00
|
|
|
|
2014-05-31 19:12:21 +02:00
|
|
|
.. triqs_example:: ./shape_0.cpp
|