mirror of https://github.com/CGAL/cgal
52 lines
1.9 KiB
TeX
52 lines
1.9 KiB
TeX
%% =============================================================================
|
|
%% The CGAL Reference Manual
|
|
%% Chapter: STL Extensions - The Reference Part
|
|
%% -----------------------------------------------------------------------------
|
|
%% author: Sylvain Pion
|
|
%% -----------------------------------------------------------------------------
|
|
%% $Id$
|
|
%% $URL$
|
|
%% =============================================================================
|
|
|
|
%% +=========================================================================+
|
|
|
|
\begin{ccRefClass}{array<T, int>}
|
|
|
|
\ccDefinition
|
|
|
|
An object of the class \ccClassTemplateName\ represents an array of elements
|
|
of type \ccc{T}, the number of which is specified by the second template argument.
|
|
|
|
There is actually no class in \cgal\ with this name, but a using declaration which
|
|
imports a class from another namespace. By order of priority: the one in namespace
|
|
\ccc{std} is used (provided by C++0x), if not found, then the one in namespace
|
|
\ccc{std::tr1} is used (provided by TR1), and finally, the fallback solution
|
|
is taken from Boost.
|
|
|
|
\ccInclude{CGAL/array.h}
|
|
|
|
%% +-----------------------------------+
|
|
\ccParameters
|
|
|
|
The parameter \ccStyle{T} is the value type. The second parameter is the
|
|
dimension of the array.
|
|
|
|
%% +-----------------------------------+
|
|
\ccHeading{Construction functions}
|
|
|
|
The array class does not provide a constructor which can be used to initialize
|
|
data members. \cgal\ therefore provides a \ccc{make_array} function for
|
|
this purpose, up to a certain number of arguments.
|
|
|
|
\def\ccTagRmEigenClassName{\ccFalse}
|
|
\ccFunction{template <class T> array<T, 1> make_array(const T& a);}
|
|
{returns an array of dimension 1 whose first element is \ccc{a}.}
|
|
|
|
\ccFunction{template <class T> array<T, 2> make_array(const T& a1, const T& a2);}
|
|
{returns an array of dimension 2 whose first element is \ccc{a1}
|
|
and second element is \ccc{a2}.}
|
|
|
|
\end{ccRefClass}
|
|
|
|
\ccParDims
|