\hypertarget{classSPL_1_1Sequence1}{}\section{S\+P\+L\+:\+:Sequence1$<$ T $>$ Class Template Reference}
\label{classSPL_1_1Sequence1}\index{S\+P\+L\+::\+Sequence1$<$ T $>$@{S\+P\+L\+::\+Sequence1$<$ T $>$}}


A one-\/dimensional sequence class with lazy copying and reference counting.  




{\ttfamily \#include $<$Sequence1.\+hpp$>$}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef T \hyperlink{classSPL_1_1Sequence1_a9a4c79af58bcbe7b76ecfe080fac1b1d}{Elem\+Type}
\begin{DoxyCompactList}\small\item\em The type of the element in the sequence. \end{DoxyCompactList}\item 
typedef \hyperlink{classSPL_1_1Array1}{Array1}$<$ T $>$\+::\hyperlink{classSPL_1_1Sequence1_a9813fbfd7d3b18ae1d1b92b153f3b29f}{Const\+Iterator} \hyperlink{classSPL_1_1Sequence1_a9813fbfd7d3b18ae1d1b92b153f3b29f}{Const\+Iterator}
\begin{DoxyCompactList}\small\item\em The const iterator for the sequence. \end{DoxyCompactList}\item 
typedef \hyperlink{classSPL_1_1Array1}{Array1}$<$ T $>$\+::\hyperlink{classSPL_1_1Sequence1_af9cae724a605b2331358f3aecf08f57b}{Iterator} \hyperlink{classSPL_1_1Sequence1_af9cae724a605b2331358f3aecf08f57b}{Iterator}
\begin{DoxyCompactList}\small\item\em The mutable iterator for the sequence. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Sequence1_ga877aa1b289aeecb6fa28ba2ed800a63c}{Sequence1} ()
\begin{DoxyCompactList}\small\item\em The default constructor. \end{DoxyCompactList}\item 
\hyperlink{group__Sequence1_gaac3b39c8c2caaa61f2a6ec425a985a1c}{Sequence1} (int start\+Ind, int size)
\begin{DoxyCompactList}\small\item\em Construct a sequence with the specified start index and size. \end{DoxyCompactList}\item 
\hyperlink{group__Sequence1_ga2af5d425dc90f7fbc2d25077af98abec}{Sequence1} (int start\+Ind, int size, const T \&value)
\begin{DoxyCompactList}\small\item\em Construct a sequence with the specified start index and size, with all elements set to the given value. \end{DoxyCompactList}\item 
{\footnotesize template$<$class Input\+Iterator $>$ }\\\hyperlink{classSPL_1_1Sequence1_a6e4ddfc28fa9e8623e83396a03bfd084}{Sequence1} (int start\+Ind, int size, Input\+Iterator data)
\begin{DoxyCompactList}\small\item\em Construct a sequence with the specified start index and size, with the elements initialized to the data read from the given iterator. \end{DoxyCompactList}\item 
\hyperlink{group__Sequence1_ga32be4412f26e6625b81ff826d4a65209}{Sequence1} (const \hyperlink{classSPL_1_1Sequence1}{Sequence1} \&f)
\begin{DoxyCompactList}\small\item\em The copy constructor. \end{DoxyCompactList}\item 
{\footnotesize template$<$class Other\+T $>$ }\\\hyperlink{classSPL_1_1Sequence1_a57eb7fb5009c9a1c8e854fc1615562fe}{Sequence1} (const \hyperlink{classSPL_1_1Sequence1}{Sequence1}$<$ Other\+T $>$ \&f)
\begin{DoxyCompactList}\small\item\em Create a sequence from another sequence having elements of a different type. \end{DoxyCompactList}\item 
\hyperlink{group__Sequence1_ga431aa354561dce233f7c414f7700932e}{Sequence1} (const \hyperlink{classSPL_1_1Array1}{Array1}$<$ T $>$ \&data)
\begin{DoxyCompactList}\small\item\em Create a sequence from an array. \end{DoxyCompactList}\item 
\hyperlink{group__Sequence1_ga3ab63d27aef18859073f2ad5bb33193e}{Sequence1} (int start\+Ind, const \hyperlink{classSPL_1_1Array1}{Array1}$<$ T $>$ \&data)
\begin{DoxyCompactList}\small\item\em Create a sequence from an array using the given starting index. \end{DoxyCompactList}\item 
\hyperlink{group__Sequence1_ga8c39adc17bf58f33c158fffa1128991a}{$\sim$\+Sequence1} ()
\begin{DoxyCompactList}\small\item\em The destructor. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1}{Sequence1} \& \hyperlink{group__Sequence1_ga26fd22a681ea63554c22c74d0e9c19f0}{operator=} (const \hyperlink{classSPL_1_1Sequence1}{Sequence1} \&f)
\begin{DoxyCompactList}\small\item\em The assignment operator. \end{DoxyCompactList}\item 
{\footnotesize template$<$class Other\+T $>$ }\\\hyperlink{classSPL_1_1Sequence1}{Sequence1} \& \hyperlink{classSPL_1_1Sequence1_af4c6d618d565f86c3b911971de989c38}{operator=} (const \hyperlink{classSPL_1_1Sequence1}{Sequence1}$<$ Other\+T $>$ \&f)
\begin{DoxyCompactList}\small\item\em Assign another sequence with elements of a different type to this sequence. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1}{Sequence1} \& \hyperlink{group__Sequence1_ga9048e80486a67d48e6e03184e68d00c6}{operator+=} (const \hyperlink{classSPL_1_1Sequence1}{Sequence1} \&f)
\begin{DoxyCompactList}\small\item\em Add another sequence to this one. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1}{Sequence1} \& \hyperlink{group__Sequence1_ga8896fcd5a23941ffe6f82f29ce696f20}{operator-\/=} (const \hyperlink{classSPL_1_1Sequence1}{Sequence1} \&f)
\begin{DoxyCompactList}\small\item\em Subtract another sequence from this one. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1}{Sequence1} \& \hyperlink{group__Sequence1_ga0dd12ad34a95b7391bb4d24af60cf24d}{operator$\ast$=} (const \hyperlink{classSPL_1_1Sequence1}{Sequence1} \&f)
\begin{DoxyCompactList}\small\item\em Multiply elementwise this sequence by another one. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1}{Sequence1} \& \hyperlink{group__Sequence1_ga6f9d2a03842e2abd1c8539c5920e8a22}{operator/=} (const \hyperlink{classSPL_1_1Sequence1}{Sequence1} \&f)
\begin{DoxyCompactList}\small\item\em Divide elementwise this sequence by another one. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1}{Sequence1} \& \hyperlink{group__Sequence1_gab9041794a014d308ca27fc57d17c9aaa}{operator+=} (const T \&value)
\begin{DoxyCompactList}\small\item\em Add a value to each element of this sequence. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1}{Sequence1} \& \hyperlink{group__Sequence1_ga589984c8ccca548be00d44f776ac985f}{operator-\/=} (const T \&value)
\begin{DoxyCompactList}\small\item\em Subtract a value from each element of this sequence. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1}{Sequence1} \& \hyperlink{group__Sequence1_ga5291149b693d4ef9b97cbccb154949dd}{operator$\ast$=} (const T \&value)
\begin{DoxyCompactList}\small\item\em Multiply each element of this sequence by the specified value. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1}{Sequence1} \& \hyperlink{group__Sequence1_gaf04030b0a17904f6d490ed531afb9ef6}{operator/=} (const T \&value)
\begin{DoxyCompactList}\small\item\em Divide each element of the sequence by the given value. \end{DoxyCompactList}\item 
int \hyperlink{group__Sequence1_ga19f3bb7dd56945d8b14ffbae4c6c3909}{get\+Start\+Ind} () const 
\begin{DoxyCompactList}\small\item\em Get the start index for the sequence. \end{DoxyCompactList}\item 
int \hyperlink{group__Sequence1_ga0a71d51fe08d2ac2f6c18a1131993b8f}{get\+End\+Ind} () const 
\begin{DoxyCompactList}\small\item\em Get the end index for the sequence. \end{DoxyCompactList}\item 
int \hyperlink{group__Sequence1_ga92b2556e2f47703a3032a7014202c7da}{get\+Size} () const 
\begin{DoxyCompactList}\small\item\em Get the length of the sequence. \end{DoxyCompactList}\item 
bool \hyperlink{group__Sequence1_gab720f6ff9ddf78be2a49a1e3feb533da}{is\+Shared} () const 
\begin{DoxyCompactList}\small\item\em Is the array for this sequence shared with another array? \end{DoxyCompactList}\item 
const T \& \hyperlink{group__Sequence1_ga7854430bb4860ad05f519f12793c3693}{operator()} (int i) const 
\begin{DoxyCompactList}\small\item\em Get the specified element in the sequence. \end{DoxyCompactList}\item 
T \& \hyperlink{group__Sequence1_ga258748afe582ef37ad400728c63b7443}{operator()} (int i)
\begin{DoxyCompactList}\small\item\em Get the specified element in the sequence. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1_a9813fbfd7d3b18ae1d1b92b153f3b29f}{Const\+Iterator} \hyperlink{group__Sequence1_ga982c532eebab2cac5d3e31b980dd6db6}{begin} () const 
\begin{DoxyCompactList}\small\item\em Get an iterator referencing the first element in the sequence. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1_af9cae724a605b2331358f3aecf08f57b}{Iterator} \hyperlink{group__Sequence1_ga892da97454a54870c2f79b57644df44b}{begin} ()
\begin{DoxyCompactList}\small\item\em Get an iterator referencing the first element in the sequence. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1_a9813fbfd7d3b18ae1d1b92b153f3b29f}{Const\+Iterator} \hyperlink{group__Sequence1_ga30f9ad94b461824da07a9b9cacdf6b2f}{end} () const 
\begin{DoxyCompactList}\small\item\em Get an iterator referencing just after the last element in the sequence. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1_af9cae724a605b2331358f3aecf08f57b}{Iterator} \hyperlink{group__Sequence1_gabf74893aba8d4df5808a58706583f339}{end} ()
\begin{DoxyCompactList}\small\item\em Get an iterator referencing just after the last element in the sequence. \end{DoxyCompactList}\item 
T \hyperlink{group__Sequence1_ga24d9aba91a2b29fde21b8a423aa482d5}{min} () const 
\begin{DoxyCompactList}\small\item\em Get the minimum element in the sequence. \end{DoxyCompactList}\item 
T \hyperlink{group__Sequence1_gaad48c4cd9c08a632358e3a78333e76ee}{max} () const 
\begin{DoxyCompactList}\small\item\em Get the maximum element in the sequence. \end{DoxyCompactList}\item 
T \hyperlink{group__Sequence1_gabd2efa6deb2c13ee4bea7fabecb47585}{sum} () const 
\begin{DoxyCompactList}\small\item\em Get the sum of the elements in the sequence. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Array1}{Array1}$<$ T $>$ \hyperlink{group__Sequence1_gaa1c4aedc1e49df94c28620776ed40e73}{get\+Array} () const 
\begin{DoxyCompactList}\small\item\em Get a copy of the underlying array. \end{DoxyCompactList}\item 
void \hyperlink{group__Sequence1_ga2acd6022bb336135e04f8cc8b21dad3b}{swap\+Array} (\hyperlink{classSPL_1_1Array1}{Array1}$<$ T $>$ \&data)
\begin{DoxyCompactList}\small\item\em Swap the data for the underlying array and the specified array. \end{DoxyCompactList}\item 
void \hyperlink{group__Sequence1_gaefdab9336d8361d9b078a40d03e26136}{fill} (const T \&value)
\begin{DoxyCompactList}\small\item\em Set all of the elements in the sequence to the specified value. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1Sequence1}{Sequence1} \& \hyperlink{group__Sequence1_ga2ddb39ff6c0e8f1f53b47ba4f9f200e5}{translate} (int delta)
\begin{DoxyCompactList}\small\item\em Translate (i.\+e., shift) a sequence by the specified displacement. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class T$>$class S\+P\+L\+::\+Sequence1$<$ T $>$}

A one-\/dimensional sequence class with lazy copying and reference counting. 

\subsection{Member Typedef Documentation}
\hypertarget{classSPL_1_1Sequence1_a9813fbfd7d3b18ae1d1b92b153f3b29f}{}\index{S\+P\+L\+::\+Sequence1@{S\+P\+L\+::\+Sequence1}!Const\+Iterator@{Const\+Iterator}}
\index{Const\+Iterator@{Const\+Iterator}!S\+P\+L\+::\+Sequence1@{S\+P\+L\+::\+Sequence1}}
\subsubsection[{Const\+Iterator}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T$>$ typedef {\bf Array1}$<$T$>$\+::{\bf Const\+Iterator} {\bf S\+P\+L\+::\+Sequence1}$<$ T $>$\+::{\bf Const\+Iterator}}\label{classSPL_1_1Sequence1_a9813fbfd7d3b18ae1d1b92b153f3b29f}


The const iterator for the sequence. 

\hypertarget{classSPL_1_1Sequence1_a9a4c79af58bcbe7b76ecfe080fac1b1d}{}\index{S\+P\+L\+::\+Sequence1@{S\+P\+L\+::\+Sequence1}!Elem\+Type@{Elem\+Type}}
\index{Elem\+Type@{Elem\+Type}!S\+P\+L\+::\+Sequence1@{S\+P\+L\+::\+Sequence1}}
\subsubsection[{Elem\+Type}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T$>$ typedef T {\bf S\+P\+L\+::\+Sequence1}$<$ T $>$\+::{\bf Elem\+Type}}\label{classSPL_1_1Sequence1_a9a4c79af58bcbe7b76ecfe080fac1b1d}


The type of the element in the sequence. 

\hypertarget{classSPL_1_1Sequence1_af9cae724a605b2331358f3aecf08f57b}{}\index{S\+P\+L\+::\+Sequence1@{S\+P\+L\+::\+Sequence1}!Iterator@{Iterator}}
\index{Iterator@{Iterator}!S\+P\+L\+::\+Sequence1@{S\+P\+L\+::\+Sequence1}}
\subsubsection[{Iterator}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T$>$ typedef {\bf Array1}$<$T$>$\+::{\bf Iterator} {\bf S\+P\+L\+::\+Sequence1}$<$ T $>$\+::{\bf Iterator}}\label{classSPL_1_1Sequence1_af9cae724a605b2331358f3aecf08f57b}


The mutable iterator for the sequence. 



\subsection{Constructor \& Destructor Documentation}
\hypertarget{classSPL_1_1Sequence1_a6e4ddfc28fa9e8623e83396a03bfd084}{}\index{S\+P\+L\+::\+Sequence1@{S\+P\+L\+::\+Sequence1}!Sequence1@{Sequence1}}
\index{Sequence1@{Sequence1}!S\+P\+L\+::\+Sequence1@{S\+P\+L\+::\+Sequence1}}
\subsubsection[{Sequence1}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T$>$ template$<$class Input\+Iterator $>$ {\bf S\+P\+L\+::\+Sequence1}$<$ T $>$\+::{\bf Sequence1} (
\begin{DoxyParamCaption}
\item[{int}]{start\+Ind, }
\item[{int}]{size, }
\item[{Input\+Iterator}]{data}
\end{DoxyParamCaption}
)}\label{classSPL_1_1Sequence1_a6e4ddfc28fa9e8623e83396a03bfd084}


Construct a sequence with the specified start index and size, with the elements initialized to the data read from the given iterator. 

Effects\+: A sequence with a starting index of start\+Ind and size size is created, with the elements being initialized by the data pointed to by data. \hypertarget{classSPL_1_1Sequence1_a57eb7fb5009c9a1c8e854fc1615562fe}{}\index{S\+P\+L\+::\+Sequence1@{S\+P\+L\+::\+Sequence1}!Sequence1@{Sequence1}}
\index{Sequence1@{Sequence1}!S\+P\+L\+::\+Sequence1@{S\+P\+L\+::\+Sequence1}}
\subsubsection[{Sequence1}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T$>$ template$<$class Other\+T $>$ {\bf S\+P\+L\+::\+Sequence1}$<$ T $>$\+::{\bf Sequence1} (
\begin{DoxyParamCaption}
\item[{const {\bf Sequence1}$<$ Other\+T $>$ \&}]{f}
\end{DoxyParamCaption}
)}\label{classSPL_1_1Sequence1_a57eb7fb5009c9a1c8e854fc1615562fe}


Create a sequence from another sequence having elements of a different type. 



\subsection{Member Function Documentation}
\hypertarget{classSPL_1_1Sequence1_af4c6d618d565f86c3b911971de989c38}{}\index{S\+P\+L\+::\+Sequence1@{S\+P\+L\+::\+Sequence1}!operator=@{operator=}}
\index{operator=@{operator=}!S\+P\+L\+::\+Sequence1@{S\+P\+L\+::\+Sequence1}}
\subsubsection[{operator=}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T$>$ template$<$class Other\+T $>$ {\bf Sequence1}\& {\bf S\+P\+L\+::\+Sequence1}$<$ T $>$\+::operator= (
\begin{DoxyParamCaption}
\item[{const {\bf Sequence1}$<$ Other\+T $>$ \&}]{f}
\end{DoxyParamCaption}
)}\label{classSPL_1_1Sequence1_af4c6d618d565f86c3b911971de989c38}


Assign another sequence with elements of a different type to this sequence. 

The type Other\+T must be assignable to the type T. 

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{Sequence1_8hpp}{Sequence1.\+hpp}\end{DoxyCompactItemize}
