\hypertarget{Sequence1_8hpp}{}\section{Sequence1.\+hpp File Reference}
\label{Sequence1_8hpp}\index{Sequence1.\+hpp@{Sequence1.\+hpp}}


This file contains code for the Sequence1 template class.  


{\ttfamily \#include $<$S\+P\+L/config.\+hpp$>$}\\*
{\ttfamily \#include $<$iostream$>$}\\*
{\ttfamily \#include $<$vector$>$}\\*
{\ttfamily \#include $<$S\+P\+L/\+Array1.\+hpp$>$}\\*
{\ttfamily \#include $<$S\+P\+L/math.\+hpp$>$}\\*
{\ttfamily \#include $<$S\+P\+L/\+Sequence.\+hpp$>$}\\*
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classSPL_1_1Sequence1}{S\+P\+L\+::\+Sequence1$<$ T $>$}
\begin{DoxyCompactList}\small\item\em A one-\/dimensional sequence class with lazy copying and reference counting. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{Sequence1_8hpp_a96dac83a80acab70fd52e1b28bc4470c}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+D\+E\+B\+U\+G}
\begin{DoxyCompactList}\small\item\em Defining this symbol will enable extra code for debugging. \end{DoxyCompactList}\item 
\#define \hyperlink{Sequence1_8hpp_a5854e2983312a2c07f6855cf6124d0df}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+U\+S\+E\+\_\+\+N\+E\+W\+\_\+\+C\+O\+N\+V}
\begin{DoxyCompactList}\small\item\em Defining this symbol will enable the use of new convolution code. \end{DoxyCompactList}\item 
\#define \hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E}
\begin{DoxyCompactList}\small\item\em Prevent the inlining of functions. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef Sequence1$<$ double $>$ \hyperlink{group__Sequence1_ga5c1c0ab58058e8c920c2339fc593e6c2}{S\+P\+L\+::\+Real\+Sequence1}
\begin{DoxyCompactList}\small\item\em Real sequence. \end{DoxyCompactList}\item 
typedef Sequence1$<$ int $>$ \hyperlink{group__Sequence1_ga1cf635d243fb6f7c900ea483cc28624f}{S\+P\+L\+::\+Int\+Sequence1}
\begin{DoxyCompactList}\small\item\em Integer sequence. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$class T $>$ }\\std\+::ostream \& \hyperlink{group__Sequence1_ga244cbf41f3ecf0a8d44e0cd7d8a5969c}{S\+P\+L\+::operator$<$$<$} (std\+::ostream \&out, const Sequence1$<$ T $>$ \&f)
\begin{DoxyCompactList}\small\item\em Output a sequence to a stream. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\std\+::istream \& \hyperlink{group__Sequence1_ga3c0389e9ea339c6c7165405dd7a6003b}{S\+P\+L\+::operator$>$$>$} (std\+::istream \&in, Sequence1$<$ T $>$ \&f)
\begin{DoxyCompactList}\small\item\em Input a sequence from a stream. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} Sequence1$<$ T $>$ \hyperlink{group__Sequence1_gaa7b1953ffd3d6473ad75c8b67babc580}{S\+P\+L\+::operator+} (const Sequence1$<$ T $>$ \&f, const Sequence1$<$ T $>$ \&g)
\begin{DoxyCompactList}\small\item\em Compute the sum of two sequences. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} Sequence1$<$ T $>$ \hyperlink{group__Sequence1_ga8b65262f68af3fca242d49f01566faf7}{S\+P\+L\+::operator-\/} (const Sequence1$<$ T $>$ \&f, const Sequence1$<$ T $>$ \&g)
\begin{DoxyCompactList}\small\item\em Compute the difference of two sequences. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} Sequence1$<$ T $>$ \hyperlink{group__Sequence1_ga159da7e2aad3628d61f78b95bf0a1f3b}{S\+P\+L\+::operator$\ast$} (const Sequence1$<$ T $>$ \&f, const Sequence1$<$ T $>$ \&g)
\begin{DoxyCompactList}\small\item\em Compute the (element-\/wise) product of two sequences. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} Sequence1$<$ T $>$ \hyperlink{group__Sequence1_ga06b60abe2aac1900bddd00fe86ba747c}{S\+P\+L\+::operator/} (const Sequence1$<$ T $>$ \&f, const Sequence1$<$ T $>$ \&g)
\begin{DoxyCompactList}\small\item\em Compute the (element-\/wise) quotient of two sequences. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence1$<$ T $>$ \hyperlink{group__Sequence1_ga5a56e479ae6a9d869369007481dffe1f}{S\+P\+L\+::add} (const Sequence1$<$ T $>$ \&f, const Sequence1$<$ T $>$ \&g)
\begin{DoxyCompactList}\small\item\em Compute the sum of two sequences with potentially differing domains. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} Sequence1$<$ T $>$ \hyperlink{group__Sequence1_ga32478b087b8c3a1ddd61482ed96b279f}{S\+P\+L\+::operator+} (const T \&a, const Sequence1$<$ T $>$ \&f)
\begin{DoxyCompactList}\small\item\em Add a value to a sequence. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} Sequence1$<$ T $>$ \hyperlink{group__Sequence1_ga73deeb76f4438dd1ee81152712b47645}{S\+P\+L\+::operator+} (const Sequence1$<$ T $>$ \&f, const T \&a)
\begin{DoxyCompactList}\small\item\em Add a value to a sequence. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} Sequence1$<$ T $>$ \hyperlink{group__Sequence1_gacb98697ef1c5f284940e145422dc8c25}{S\+P\+L\+::operator-\/} (const Sequence1$<$ T $>$ \&f, const T \&a)
\begin{DoxyCompactList}\small\item\em Subtract a value from a sequence. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} Sequence1$<$ T $>$ \hyperlink{group__Sequence1_ga2d509569f70067618a7271a3e9899590}{S\+P\+L\+::operator$\ast$} (const T \&a, const Sequence1$<$ T $>$ \&f)
\begin{DoxyCompactList}\small\item\em Compute a scalar multiple of a sequence. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} Sequence1$<$ T $>$ \hyperlink{group__Sequence1_gad6d431511255663c36d0b6b6c54c460b}{S\+P\+L\+::operator$\ast$} (const Sequence1$<$ T $>$ \&f, const T \&a)
\begin{DoxyCompactList}\small\item\em Compute a scalar multiple of a sequence. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} Sequence1$<$ T $>$ \hyperlink{group__Sequence1_ga40973abce3db28e89c34baab5f91fa2d}{S\+P\+L\+::operator/} (const Sequence1$<$ T $>$ \&f, const T \&a)
\begin{DoxyCompactList}\small\item\em Divide a sequence by a scalar. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} bool \hyperlink{group__Sequence1_ga9eb828612692369676e67c258d288f57}{S\+P\+L\+::operator==} (const Sequence1$<$ T $>$ \&f, const Sequence1$<$ T $>$ \&g)
\begin{DoxyCompactList}\small\item\em Test two sequences for equality. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} bool \hyperlink{group__Sequence1_ga22b0e4bd7d66ece8131ffc8bed724d9c}{S\+P\+L\+::operator!=} (const Sequence1$<$ T $>$ \&f, const Sequence1$<$ T $>$ \&g)
\begin{DoxyCompactList}\small\item\em Test two sequences for inequality. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} bool \hyperlink{group__Sequence1_gaed24daed3c4c55095b0f2c3cdb75f668}{S\+P\+L\+::approx\+Equal} (const Sequence1$<$ T $>$ \&f, const Sequence1$<$ T $>$ \&g, T threshold=1e-\/9)
\begin{DoxyCompactList}\small\item\em Test two sequences for approximate equality. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence1$<$ T $>$ \hyperlink{group__Sequence1_ga2ea81846f6c0320b879e50609ccffb61}{S\+P\+L\+::subsequence} (const Sequence1$<$ T $>$ \&f, int start\+Ind, int size)
\begin{DoxyCompactList}\small\item\em Extract a subsequence from a sequence. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E} Sequence1$<$ T $>$ \hyperlink{group__Sequence1_ga2d5b936462997eed9f860e812ee8431b}{S\+P\+L\+::translate} (const Sequence1$<$ T $>$ \&f, int delta)
\begin{DoxyCompactList}\small\item\em Translate a sequence by the specified amount. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence1$<$ T $>$ \hyperlink{group__Sequence1_gae3727ebf13bf60a63ed23c1d760f12c4}{S\+P\+L\+::convolve} (const Sequence1$<$ T $>$ \&f, const Sequence1$<$ T $>$ \&g, int mode=Convolve\+Mode\+::full)
\begin{DoxyCompactList}\small\item\em Compute the convolution of two sequences. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence1$<$ T $>$ \hyperlink{group__Sequence1_ga72f351125a956688ffedb05aa615ab25}{S\+P\+L\+::downsample} (const Sequence1$<$ T $>$ \&f, int factor)
\begin{DoxyCompactList}\small\item\em Downsample a sequence by the specified factor. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence1$<$ T $>$ \hyperlink{group__Sequence1_ga162d7f981e031faf4ef630974010727d}{S\+P\+L\+::upsample} (const Sequence1$<$ T $>$ \&f, int factor, int pad=0)
\begin{DoxyCompactList}\small\item\em Upsample a sequence by the specified factor. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Array1$<$ Sequence1$<$ T $>$ $>$ \hyperlink{group__Sequence1_ga34f426df7de61a393a4dd1e000014402}{S\+P\+L\+::polyphase\+Split} (const Sequence1$<$ T $>$ \&seq, int type, int num\+Phases)
\begin{DoxyCompactList}\small\item\em Split a sequence into its polyphase components. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence1$<$ T $>$ \hyperlink{group__Sequence1_gacdb17b76e562cd9551f62bdfc873a8b6}{S\+P\+L\+::polyphase\+Join} (const Array1$<$ Sequence1$<$ T $>$ $>$ \&comps, int type)
\begin{DoxyCompactList}\small\item\em Reassemble a sequence from its polyphase components. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This file contains code for the Sequence1 template class. 



\subsection{Macro Definition Documentation}
\hypertarget{Sequence1_8hpp_a96dac83a80acab70fd52e1b28bc4470c}{}\index{Sequence1.\+hpp@{Sequence1.\+hpp}!S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+D\+E\+B\+U\+G@{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+D\+E\+B\+U\+G}}
\index{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+D\+E\+B\+U\+G@{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+D\+E\+B\+U\+G}!Sequence1.\+hpp@{Sequence1.\+hpp}}
\subsubsection[{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+D\+E\+B\+U\+G}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+D\+E\+B\+U\+G}\label{Sequence1_8hpp_a96dac83a80acab70fd52e1b28bc4470c}


Defining this symbol will enable extra code for debugging. 

\hypertarget{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}{}\index{Sequence1.\+hpp@{Sequence1.\+hpp}!S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E@{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E}}
\index{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E@{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E}!Sequence1.\+hpp@{Sequence1.\+hpp}}
\subsubsection[{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+I\+N\+L\+I\+N\+E}\label{Sequence1_8hpp_a6d997656cd08515ed30f524d6373daf0}


Prevent the inlining of functions. 

\hypertarget{Sequence1_8hpp_a5854e2983312a2c07f6855cf6124d0df}{}\index{Sequence1.\+hpp@{Sequence1.\+hpp}!S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+U\+S\+E\+\_\+\+N\+E\+W\+\_\+\+C\+O\+N\+V@{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+U\+S\+E\+\_\+\+N\+E\+W\+\_\+\+C\+O\+N\+V}}
\index{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+U\+S\+E\+\_\+\+N\+E\+W\+\_\+\+C\+O\+N\+V@{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+U\+S\+E\+\_\+\+N\+E\+W\+\_\+\+C\+O\+N\+V}!Sequence1.\+hpp@{Sequence1.\+hpp}}
\subsubsection[{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+U\+S\+E\+\_\+\+N\+E\+W\+\_\+\+C\+O\+N\+V}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E1\+\_\+\+U\+S\+E\+\_\+\+N\+E\+W\+\_\+\+C\+O\+N\+V}\label{Sequence1_8hpp_a5854e2983312a2c07f6855cf6124d0df}


Defining this symbol will enable the use of new convolution code. 

