\hypertarget{a00027}{
\section{mln::util::array$<$ T $>$ Class Template Reference}
\label{d0/d33/a00027}\index{mln::util::array@{mln::util::array}}
}


A dynamic array class.  




{\ttfamily \#include $<$array.hh$>$}



Inheritance diagram for mln::util::array$<$ T $>$:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=232pt]{d8/d56/a03982}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef T \hyperlink{a00027_a0b28fa0c3cc04f329ca1867645fdddcc}{element}
\begin{DoxyCompactList}\small\item\em Element associated type. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
typedef T \hyperlink{a00027_a5b9d42f798018b0668489f4897d745ee}{result}
\begin{DoxyCompactList}\small\item\em Returned value types. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
typedef array\_\-fwd\_\-iter$<$ T $>$ \hyperlink{a00027_a7a1a70364b3b6a51820824d1f2cabddc}{fwd\_\-eiter}
\begin{DoxyCompactList}\small\item\em \hyperlink{a00046}{Iterator} types

Forward iterator associated type. \item\end{DoxyCompactList}\item 
typedef array\_\-bkd\_\-iter$<$ T $>$ \hyperlink{a00027_a43e935811c15426916e391169f011944}{bkd\_\-eiter}
\begin{DoxyCompactList}\small\item\em Backward iterator associated type. \item\end{DoxyCompactList}\item 
typedef \hyperlink{a00027_a7a1a70364b3b6a51820824d1f2cabddc}{fwd\_\-eiter} \hyperlink{a00027_ae854a68433df59aad1f1b61838f9c6cf}{eiter}
\begin{DoxyCompactList}\small\item\em \hyperlink{a00046}{Iterator} associated type. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a00027}{array}$<$ T $>$ \& \hyperlink{a00027_af7ef1ea03376a64f9f603d334dd8e76a}{append} (const T \&elt)
\begin{DoxyCompactList}\small\item\em Add the element {\ttfamily elt} at the end of this array. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename U $>$ }\\\hyperlink{a00027}{array}$<$ T $>$ \& \hyperlink{a00027_accaf21e43590814ab9ba26963dbb967c}{append} (const \hyperlink{a00027}{array}$<$ U $>$ \&other)
\begin{DoxyCompactList}\small\item\em Add the elements of {\ttfamily other} at the end of this array. \item\end{DoxyCompactList}\item 
void \hyperlink{a00027_a4ad93b724cf04fc32ecfb89ea2069aa0}{clear} ()
\begin{DoxyCompactList}\small\item\em Empty the array. \item\end{DoxyCompactList}\item 
void \hyperlink{a00027_a9fac50a933e7ad70e171ce7f1854af23}{fill} (const T \&value)
\begin{DoxyCompactList}\small\item\em Fill the whole array with value {\ttfamily value}. \item\end{DoxyCompactList}\item 
bool \hyperlink{a00027_a377c4cc56f542f6ca74b1b7d6e4efd2b}{is\_\-empty} () const 
\begin{DoxyCompactList}\small\item\em Test if the array is empty. \item\end{DoxyCompactList}\item 
ro\_\-result \hyperlink{a00027_a7806161b7a1334af482e8629f0dbad4c}{last} () const 
\begin{DoxyCompactList}\small\item\em Return the last element. \item\end{DoxyCompactList}\item 
mutable\_\-result \hyperlink{a00027_aa6035ce7e8025c0d842ad9897d70a1f9}{last} ()
\begin{DoxyCompactList}\small\item\em Return the last element. \item\end{DoxyCompactList}\item 
std::size\_\-t \hyperlink{a00027_a7efe326f3155482d96ac539f96eb89a8}{memory\_\-size} () const 
\begin{DoxyCompactList}\small\item\em Return the size of this array in memory. \item\end{DoxyCompactList}\item 
unsigned \hyperlink{a00027_ae4018eb31a1fab3e1cd350d30d89765c}{nelements} () const 
\begin{DoxyCompactList}\small\item\em Return the number of elements of the array. \item\end{DoxyCompactList}\item 
ro\_\-result \hyperlink{a00027_a9d5976a8527e0203d3321a362f7a26ad}{operator()} (unsigned i) const 
\begin{DoxyCompactList}\small\item\em Return the {\ttfamily i-\/th} element of the array. \item\end{DoxyCompactList}\item 
mutable\_\-result \hyperlink{a00027_a3d6126483d01a9c6998a9b8a4af70ca5}{operator()} (unsigned i)
\begin{DoxyCompactList}\small\item\em Return the {\ttfamily i-\/th} element of the array. \item\end{DoxyCompactList}\item 
ro\_\-result \hyperlink{a00027_a930ce1078599626bdcb708864d129aeb}{operator\mbox{[}$\,$\mbox{]}} (unsigned i) const 
\begin{DoxyCompactList}\small\item\em Return the {\ttfamily i-\/th} element of the array. \item\end{DoxyCompactList}\item 
mutable\_\-result \hyperlink{a00027_ac9a4fc5698763df989e2a2b98498df1e}{operator\mbox{[}$\,$\mbox{]}} (unsigned i)
\begin{DoxyCompactList}\small\item\em Return the {\ttfamily i-\/th} element of the array. \item\end{DoxyCompactList}\item 
void \hyperlink{a00027_ab390518d2de5abe3ecb11577e564569c}{reserve} (unsigned n)
\begin{DoxyCompactList}\small\item\em Reserve memory for {\ttfamily n} elements. \item\end{DoxyCompactList}\item 
void \hyperlink{a00027_ac0f21b78248a70a5a620d866d77195aa}{resize} (unsigned n)
\begin{DoxyCompactList}\small\item\em Resize this array to {\ttfamily n} elements. \item\end{DoxyCompactList}\item 
void \hyperlink{a00027_a04430ac518346a1eefb7d9af4ab9cc4b}{resize} (unsigned n, const T \&value)
\begin{DoxyCompactList}\small\item\em Resize this array to {\ttfamily n} elements with {\ttfamily value} as value. \item\end{DoxyCompactList}\item 
unsigned \hyperlink{a00027_ac37eaf2b7aae833dd91126d729e0e7a4}{size} () const 
\begin{DoxyCompactList}\small\item\em Return the number of elements of the array. \item\end{DoxyCompactList}\item 
const std::vector$<$ T $>$ \& \hyperlink{a00027_afee712ed4413ef6551829fe186e8e4a4}{std\_\-vector} () const 
\begin{DoxyCompactList}\small\item\em Return the corresponding std::vector of elements. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
\hyperlink{a00027_a9a3d347cccee6ce8aacf20d7e44daa73}{array} ()
\begin{DoxyCompactList}\small\item\em Constructors

Constructor without arguments. \item\end{DoxyCompactList}\item 
\hyperlink{a00027_aad3d0355ce43f3cc377040d9ae874b5a}{array} (unsigned n)
\begin{DoxyCompactList}\small\item\em Construct a new array and resize it to \par
 elements. \item\end{DoxyCompactList}\item 
\hyperlink{a00027_ad3978ee3eef6f3f2849e81c30834545b}{array} (unsigned n, const T \&value)
\begin{DoxyCompactList}\small\item\em Construct a new array, resize it to \par
 elements and fill it with {\ttfamily default\_\-value}. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}


\subsection{Detailed Description}
\subsubsection*{template$<$typename T$>$ class mln::util::array$<$ T $>$}

A dynamic array class. Elements are stored by copy. Implementation is lazy.

The parameter {\ttfamily T} is the element type, which shall not be const-\/qualified. 

Definition at line 99 of file util/array.hh.



\subsection{Member Typedef Documentation}
\hypertarget{a00027_a43e935811c15426916e391169f011944}{
\index{mln::util::array@{mln::util::array}!bkd\_\-eiter@{bkd\_\-eiter}}
\index{bkd\_\-eiter@{bkd\_\-eiter}!mln::util::array@{mln::util::array}}
\subsubsection[{bkd\_\-eiter}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T$>$ typedef array\_\-bkd\_\-iter$<$T$>$ {\bf mln::util::array}$<$ T $>$::{\bf bkd\_\-eiter}}}
\label{d0/d33/a00027_a43e935811c15426916e391169f011944}


Backward iterator associated type. 



Definition at line 124 of file util/array.hh.

\hypertarget{a00027_ae854a68433df59aad1f1b61838f9c6cf}{
\index{mln::util::array@{mln::util::array}!eiter@{eiter}}
\index{eiter@{eiter}!mln::util::array@{mln::util::array}}
\subsubsection[{eiter}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T$>$ typedef {\bf fwd\_\-eiter} {\bf mln::util::array}$<$ T $>$::{\bf eiter}}}
\label{d0/d33/a00027_ae854a68433df59aad1f1b61838f9c6cf}


\hyperlink{a00046}{Iterator} associated type. 



Definition at line 127 of file util/array.hh.

\hypertarget{a00027_a0b28fa0c3cc04f329ca1867645fdddcc}{
\index{mln::util::array@{mln::util::array}!element@{element}}
\index{element@{element}!mln::util::array@{mln::util::array}}
\subsubsection[{element}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T$>$ typedef T {\bf mln::util::array}$<$ T $>$::{\bf element}}}
\label{d0/d33/a00027_a0b28fa0c3cc04f329ca1867645fdddcc}


Element associated type. 



Definition at line 107 of file util/array.hh.

\hypertarget{a00027_a7a1a70364b3b6a51820824d1f2cabddc}{
\index{mln::util::array@{mln::util::array}!fwd\_\-eiter@{fwd\_\-eiter}}
\index{fwd\_\-eiter@{fwd\_\-eiter}!mln::util::array@{mln::util::array}}
\subsubsection[{fwd\_\-eiter}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T$>$ typedef array\_\-fwd\_\-iter$<$T$>$ {\bf mln::util::array}$<$ T $>$::{\bf fwd\_\-eiter}}}
\label{d0/d33/a00027_a7a1a70364b3b6a51820824d1f2cabddc}


\hyperlink{a00046}{Iterator} types

Forward iterator associated type. 



Definition at line 121 of file util/array.hh.

\hypertarget{a00027_a5b9d42f798018b0668489f4897d745ee}{
\index{mln::util::array@{mln::util::array}!result@{result}}
\index{result@{result}!mln::util::array@{mln::util::array}}
\subsubsection[{result}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T$>$ typedef T {\bf mln::util::array}$<$ T $>$::{\bf result}}}
\label{d0/d33/a00027_a5b9d42f798018b0668489f4897d745ee}


Returned value types. 

Related to the \hyperlink{a00034}{Function\_\-v2v} concept. 

Definition at line 112 of file util/array.hh.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{a00027_a9a3d347cccee6ce8aacf20d7e44daa73}{
\index{mln::util::array@{mln::util::array}!array@{array}}
\index{array@{array}!mln::util::array@{mln::util::array}}
\subsubsection[{array}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf mln::util::array}$<$ T $>$::{\bf array} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_a9a3d347cccee6ce8aacf20d7e44daa73}


Constructors

Constructor without arguments. 



Definition at line 427 of file util/array.hh.

\hypertarget{a00027_aad3d0355ce43f3cc377040d9ae874b5a}{
\index{mln::util::array@{mln::util::array}!array@{array}}
\index{array@{array}!mln::util::array@{mln::util::array}}
\subsubsection[{array}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf mln::util::array}$<$ T $>$::{\bf array} (
\begin{DoxyParamCaption}
\item[{unsigned}]{ n}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_aad3d0355ce43f3cc377040d9ae874b5a}


Construct a new array and resize it to \par
 elements. 



Definition at line 433 of file util/array.hh.

\hypertarget{a00027_ad3978ee3eef6f3f2849e81c30834545b}{
\index{mln::util::array@{mln::util::array}!array@{array}}
\index{array@{array}!mln::util::array@{mln::util::array}}
\subsubsection[{array}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T$>$ {\bf mln::util::array}$<$ T $>$::{\bf array} (
\begin{DoxyParamCaption}
\item[{unsigned}]{ n, }
\item[{const T \&}]{ value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_ad3978ee3eef6f3f2849e81c30834545b}


Construct a new array, resize it to \par
 elements and fill it with {\ttfamily default\_\-value}. 



Definition at line 440 of file util/array.hh.



\subsection{Member Function Documentation}
\hypertarget{a00027_af7ef1ea03376a64f9f603d334dd8e76a}{
\index{mln::util::array@{mln::util::array}!append@{append}}
\index{append@{append}!mln::util::array@{mln::util::array}}
\subsubsection[{append}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T$>$ {\bf array}$<$ T $>$ \& {\bf mln::util::array}$<$ T $>$::append (
\begin{DoxyParamCaption}
\item[{const T \&}]{ elt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_af7ef1ea03376a64f9f603d334dd8e76a}


Add the element {\ttfamily elt} at the end of this array. 



Definition at line 472 of file util/array.hh.



Referenced by mln::io::dicom::get\_\-header(), and mln::io::plot::load().

\hypertarget{a00027_accaf21e43590814ab9ba26963dbb967c}{
\index{mln::util::array@{mln::util::array}!append@{append}}
\index{append@{append}!mln::util::array@{mln::util::array}}
\subsubsection[{append}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ template$<$typename U $>$ {\bf array}$<$ T $>$ \& {\bf mln::util::array}$<$ T $>$::append (
\begin{DoxyParamCaption}
\item[{const {\bf array}$<$ U $>$ \&}]{ other}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_accaf21e43590814ab9ba26963dbb967c}


Add the elements of {\ttfamily other} at the end of this array. 



Definition at line 482 of file util/array.hh.



References mln::util::array$<$ T $>$::is\_\-empty(), and mln::util::array$<$ T $>$::std\_\-vector().

\hypertarget{a00027_a4ad93b724cf04fc32ecfb89ea2069aa0}{
\index{mln::util::array@{mln::util::array}!clear@{clear}}
\index{clear@{clear}!mln::util::array@{mln::util::array}}
\subsubsection[{clear}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ void {\bf mln::util::array}$<$ T $>$::clear (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_a4ad93b724cf04fc32ecfb89ea2069aa0}


Empty the array. 

All elements contained in the array are destroyed. \begin{DoxyPostcond}{Postcondition}
\hyperlink{a00027_a377c4cc56f542f6ca74b1b7d6e4efd2b}{is\_\-empty()} == true 
\end{DoxyPostcond}


Definition at line 495 of file util/array.hh.



References mln::util::array$<$ T $>$::is\_\-empty().



Referenced by mln::io::plot::load().

\hypertarget{a00027_a9fac50a933e7ad70e171ce7f1854af23}{
\index{mln::util::array@{mln::util::array}!fill@{fill}}
\index{fill@{fill}!mln::util::array@{mln::util::array}}
\subsubsection[{fill}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T$>$ void {\bf mln::util::array}$<$ T $>$::fill (
\begin{DoxyParamCaption}
\item[{const T \&}]{ value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_a9fac50a933e7ad70e171ce7f1854af23}


Fill the whole array with value {\ttfamily value}. 



Definition at line 504 of file util/array.hh.

\hypertarget{a00027_a377c4cc56f542f6ca74b1b7d6e4efd2b}{
\index{mln::util::array@{mln::util::array}!is\_\-empty@{is\_\-empty}}
\index{is\_\-empty@{is\_\-empty}!mln::util::array@{mln::util::array}}
\subsubsection[{is\_\-empty}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ bool {\bf mln::util::array}$<$ T $>$::is\_\-empty (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_a377c4cc56f542f6ca74b1b7d6e4efd2b}


Test if the array is empty. 



Definition at line 578 of file util/array.hh.



References mln::util::array$<$ T $>$::nelements().



Referenced by mln::util::array$<$ T $>$::append(), mln::util::array$<$ T $>$::clear(), mln::make::image3d(), and mln::io::pnms::load().

\hypertarget{a00027_a7806161b7a1334af482e8629f0dbad4c}{
\index{mln::util::array@{mln::util::array}!last@{last}}
\index{last@{last}!mln::util::array@{mln::util::array}}
\subsubsection[{last}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf array}$<$ T $>$::ro\_\-result {\bf mln::util::array}$<$ T $>$::last (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_a7806161b7a1334af482e8629f0dbad4c}


Return the last element. 



Definition at line 562 of file util/array.hh.



References mln::util::array$<$ T $>$::nelements().

\hypertarget{a00027_aa6035ce7e8025c0d842ad9897d70a1f9}{
\index{mln::util::array@{mln::util::array}!last@{last}}
\index{last@{last}!mln::util::array@{mln::util::array}}
\subsubsection[{last}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf array}$<$ T $>$::mutable\_\-result {\bf mln::util::array}$<$ T $>$::last (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_aa6035ce7e8025c0d842ad9897d70a1f9}


Return the last element. 



Definition at line 570 of file util/array.hh.



References mln::util::array$<$ T $>$::nelements().

\hypertarget{a00027_a7efe326f3155482d96ac539f96eb89a8}{
\index{mln::util::array@{mln::util::array}!memory\_\-size@{memory\_\-size}}
\index{memory\_\-size@{memory\_\-size}!mln::util::array@{mln::util::array}}
\subsubsection[{memory\_\-size}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ std::size\_\-t {\bf mln::util::array}$<$ T $>$::memory\_\-size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_a7efe326f3155482d96ac539f96eb89a8}


Return the size of this array in memory. 



Definition at line 602 of file util/array.hh.



References mln::util::array$<$ T $>$::nelements().

\hypertarget{a00027_ae4018eb31a1fab3e1cd350d30d89765c}{
\index{mln::util::array@{mln::util::array}!nelements@{nelements}}
\index{nelements@{nelements}!mln::util::array@{mln::util::array}}
\subsubsection[{nelements}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ unsigned {\bf mln::util::array}$<$ T $>$::nelements (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_ae4018eb31a1fab3e1cd350d30d89765c}


Return the number of elements of the array. 



Definition at line 520 of file util/array.hh.



Referenced by mln::labeling::fill\_\-holes(), mln::make::image3d(), mln::util::array$<$ T $>$::is\_\-empty(), mln::util::array$<$ T $>$::last(), mln::io::pnms::load(), mln::util::array$<$ T $>$::memory\_\-size(), mln::util::operator$<$$<$(), mln::util::array$<$ T $>$::operator\mbox{[}$\,$\mbox{]}(), mln::io::plot::save(), and mln::util::array$<$ T $>$::size().

\hypertarget{a00027_a9d5976a8527e0203d3321a362f7a26ad}{
\index{mln::util::array@{mln::util::array}!operator()@{operator()}}
\index{operator()@{operator()}!mln::util::array@{mln::util::array}}
\subsubsection[{operator()}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf array}$<$ T $>$::ro\_\-result {\bf mln::util::array}$<$ T $>$::operator() (
\begin{DoxyParamCaption}
\item[{unsigned}]{ i}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_a9d5976a8527e0203d3321a362f7a26ad}


Return the {\ttfamily i-\/th} element of the array. 

\begin{DoxyPrecond}{Precondition}
i $<$ \hyperlink{a00027_ae4018eb31a1fab3e1cd350d30d89765c}{nelements()} 
\end{DoxyPrecond}


Definition at line 528 of file util/array.hh.

\hypertarget{a00027_a3d6126483d01a9c6998a9b8a4af70ca5}{
\index{mln::util::array@{mln::util::array}!operator()@{operator()}}
\index{operator()@{operator()}!mln::util::array@{mln::util::array}}
\subsubsection[{operator()}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf array}$<$ T $>$::mutable\_\-result {\bf mln::util::array}$<$ T $>$::operator() (
\begin{DoxyParamCaption}
\item[{unsigned}]{ i}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_a3d6126483d01a9c6998a9b8a4af70ca5}


Return the {\ttfamily i-\/th} element of the array. 

\begin{DoxyPrecond}{Precondition}
i $<$ \hyperlink{a00027_ae4018eb31a1fab3e1cd350d30d89765c}{nelements()} 
\end{DoxyPrecond}


Definition at line 536 of file util/array.hh.

\hypertarget{a00027_a930ce1078599626bdcb708864d129aeb}{
\index{mln::util::array@{mln::util::array}!operator\mbox{[}\mbox{]}@{operator[]}}
\index{operator\mbox{[}\mbox{]}@{operator[]}!mln::util::array@{mln::util::array}}
\subsubsection[{operator[]}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf array}$<$ T $>$::ro\_\-result {\bf mln::util::array}$<$ T $>$::operator\mbox{[}$\,$\mbox{]} (
\begin{DoxyParamCaption}
\item[{unsigned}]{ i}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_a930ce1078599626bdcb708864d129aeb}


Return the {\ttfamily i-\/th} element of the array. 

\begin{DoxyPrecond}{Precondition}
i $<$ \hyperlink{a00027_ae4018eb31a1fab3e1cd350d30d89765c}{nelements()} 
\end{DoxyPrecond}


Definition at line 544 of file util/array.hh.



References mln::util::array$<$ T $>$::nelements().

\hypertarget{a00027_ac9a4fc5698763df989e2a2b98498df1e}{
\index{mln::util::array@{mln::util::array}!operator\mbox{[}\mbox{]}@{operator[]}}
\index{operator\mbox{[}\mbox{]}@{operator[]}!mln::util::array@{mln::util::array}}
\subsubsection[{operator[]}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf array}$<$ T $>$::mutable\_\-result {\bf mln::util::array}$<$ T $>$::operator\mbox{[}$\,$\mbox{]} (
\begin{DoxyParamCaption}
\item[{unsigned}]{ i}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_ac9a4fc5698763df989e2a2b98498df1e}


Return the {\ttfamily i-\/th} element of the array. 

\begin{DoxyPrecond}{Precondition}
i $<$ \hyperlink{a00027_ae4018eb31a1fab3e1cd350d30d89765c}{nelements()} 
\end{DoxyPrecond}


Definition at line 553 of file util/array.hh.



References mln::util::array$<$ T $>$::nelements().

\hypertarget{a00027_ab390518d2de5abe3ecb11577e564569c}{
\index{mln::util::array@{mln::util::array}!reserve@{reserve}}
\index{reserve@{reserve}!mln::util::array@{mln::util::array}}
\subsubsection[{reserve}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ void {\bf mln::util::array}$<$ T $>$::reserve (
\begin{DoxyParamCaption}
\item[{unsigned}]{ n}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_ab390518d2de5abe3ecb11577e564569c}


Reserve memory for {\ttfamily n} elements. 



Definition at line 448 of file util/array.hh.

\hypertarget{a00027_ac0f21b78248a70a5a620d866d77195aa}{
\index{mln::util::array@{mln::util::array}!resize@{resize}}
\index{resize@{resize}!mln::util::array@{mln::util::array}}
\subsubsection[{resize}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ void {\bf mln::util::array}$<$ T $>$::resize (
\begin{DoxyParamCaption}
\item[{unsigned}]{ n}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_ac0f21b78248a70a5a620d866d77195aa}


Resize this array to {\ttfamily n} elements. 



Definition at line 456 of file util/array.hh.



Referenced by mln::labeling::impl::generic::compute(), mln::labeling::impl::compute\_\-fastest(), mln::io::raw::get\_\-header(), and mln::io::dump::get\_\-header().

\hypertarget{a00027_a04430ac518346a1eefb7d9af4ab9cc4b}{
\index{mln::util::array@{mln::util::array}!resize@{resize}}
\index{resize@{resize}!mln::util::array@{mln::util::array}}
\subsubsection[{resize}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T$>$ void {\bf mln::util::array}$<$ T $>$::resize (
\begin{DoxyParamCaption}
\item[{unsigned}]{ n, }
\item[{const T \&}]{ value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_a04430ac518346a1eefb7d9af4ab9cc4b}


Resize this array to {\ttfamily n} elements with {\ttfamily value} as value. 



Definition at line 464 of file util/array.hh.

\hypertarget{a00027_ac37eaf2b7aae833dd91126d729e0e7a4}{
\index{mln::util::array@{mln::util::array}!size@{size}}
\index{size@{size}!mln::util::array@{mln::util::array}}
\subsubsection[{size}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ unsigned {\bf mln::util::array}$<$ T $>$::size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_ac37eaf2b7aae833dd91126d729e0e7a4}


Return the number of elements of the array. 

Added for compatibility with fun::i2v::array. \begin{DoxySeeAlso}{See also}
\hyperlink{a00027_ae4018eb31a1fab3e1cd350d30d89765c}{nelements} 
\end{DoxySeeAlso}


Definition at line 512 of file util/array.hh.



References mln::util::array$<$ T $>$::nelements().



Referenced by mln::labeling::impl::generic::compute(), mln::labeling::impl::compute\_\-fastest(), mln::value::lut\_\-vec$<$ S, T $>$::lut\_\-vec(), and mln::labeled\_\-image\_\-base$<$ I, E $>$::update\_\-data().

\hypertarget{a00027_afee712ed4413ef6551829fe186e8e4a4}{
\index{mln::util::array@{mln::util::array}!std\_\-vector@{std\_\-vector}}
\index{std\_\-vector@{std\_\-vector}!mln::util::array@{mln::util::array}}
\subsubsection[{std\_\-vector}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ const std::vector$<$ T $>$ \& {\bf mln::util::array}$<$ T $>$::std\_\-vector (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d0/d33/a00027_afee712ed4413ef6551829fe186e8e4a4}


Return the corresponding std::vector of elements. 



Definition at line 586 of file util/array.hh.



Referenced by mln::util::array$<$ T $>$::append(), mln::value::lut\_\-vec$<$ S, T $>$::lut\_\-vec(), and mln::util::operator==().

