3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-26 22:33:48 +01:00
dft_tools/doc/reference/arrays/shape.rst
tayral edd1ff4529 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)
2014-10-18 12:21:08 +01:00

24 lines
825 B
ReStructuredText

.. _Shape:
Shape & dimensions
==================================
**Synopsis**:
.. code-block:: c
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);
The shape and dimensions of any object modeling :ref:`ImmutableCuboidArray` is obtained using get_shape and xxx_dim functions :
.. triqs_example:: ./shape_0.cpp