\hypertarget{Sequence2_8hpp}{}\section{Sequence2.\+hpp File Reference}
\label{Sequence2_8hpp}\index{Sequence2.\+hpp@{Sequence2.\+hpp}}


This file contains code for the Sequence2 template class.  


{\ttfamily \#include $<$S\+P\+L/config.\+hpp$>$}\\*
{\ttfamily \#include $<$iostream$>$}\\*
{\ttfamily \#include $<$vector$>$}\\*
{\ttfamily \#include $<$S\+P\+L/\+Array2.\+hpp$>$}\\*
{\ttfamily \#include $<$S\+P\+L/\+Sequence.\+hpp$>$}\\*
{\ttfamily \#include $<$S\+P\+L/\+Sequence1.\+hpp$>$}\\*
{\ttfamily \#include $<$S\+P\+L/math.\+hpp$>$}\\*
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classSPL_1_1Sequence2}{S\+P\+L\+::\+Sequence2$<$ T $>$}
\begin{DoxyCompactList}\small\item\em A two-\/dimensional sequence class with lazy copying and reference counting. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{Sequence2_8hpp_a50bdf5ef49d5143c94bcb09cd58ada1d}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+U\+S\+E\+\_\+\+N\+E\+W\+\_\+\+C\+O\+N\+V}
\begin{DoxyCompactList}\small\item\em Defining this symbol will enable extra code for debugging. \end{DoxyCompactList}\item 
\#define \hyperlink{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E}~inline
\begin{DoxyCompactList}\small\item\em Allow the inlining of functions. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef Sequence2$<$ double $>$ \hyperlink{group__Sequence2_ga902f01a2a6dcc017220c80c25ba634f5}{S\+P\+L\+::\+Real\+Sequence2}
\begin{DoxyCompactList}\small\item\em Real sequence. \end{DoxyCompactList}\item 
typedef Sequence2$<$ int $>$ \hyperlink{group__Sequence2_gaafd68b41ef0e124adcfe0b7e8a0ce2f3}{S\+P\+L\+::\+Int\+Sequence2}
\begin{DoxyCompactList}\small\item\em Integer sequence. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$class T $>$ }\\std\+::ostream \& \hyperlink{group__Sequence2_ga7479804a02ed17927203cb350fec12eb}{S\+P\+L\+::operator$<$$<$} (std\+::ostream \&out, const Sequence2$<$ T $>$ \&f)
\begin{DoxyCompactList}\small\item\em Output a sequence to a stream. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\std\+::istream \& \hyperlink{group__Sequence2_ga05d193cede562a774e667f0908f553dd}{S\+P\+L\+::operator$>$$>$} (std\+::istream \&in, Sequence2$<$ T $>$ \&f)
\begin{DoxyCompactList}\small\item\em Input a sequence from a stream. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E} Sequence2$<$ T $>$ \hyperlink{group__Sequence2_gab47130ecee5265715687769fb8f4c3a9}{S\+P\+L\+::operator+} (const Sequence2$<$ T $>$ \&f, const Sequence2$<$ T $>$ \&g)
\begin{DoxyCompactList}\small\item\em Compute the sum of two sequences. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E} Sequence2$<$ T $>$ \hyperlink{group__Sequence2_ga6a55501e8960094687ca81f7db64c217}{S\+P\+L\+::operator-\/} (const Sequence2$<$ T $>$ \&f, const Sequence2$<$ T $>$ \&g)
\begin{DoxyCompactList}\small\item\em Compute the difference of two sequences. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E} Sequence2$<$ T $>$ \hyperlink{group__Sequence2_ga85eefe27253309b9d71955ccdc61ce90}{S\+P\+L\+::operator$\ast$} (const Sequence2$<$ T $>$ \&f, const Sequence2$<$ T $>$ \&g)
\begin{DoxyCompactList}\small\item\em Compute the (element-\/wise) product of two sequences. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E} Sequence2$<$ T $>$ \hyperlink{group__Sequence2_gad68827862c138d38e95ac2bda5d82fb7}{S\+P\+L\+::operator/} (const Sequence2$<$ T $>$ \&f, const Sequence2$<$ T $>$ \&g)
\begin{DoxyCompactList}\small\item\em Compute the (element-\/wise) quotient of two sequences. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence2$<$ T $>$ \hyperlink{group__Sequence2_ga56c6bbe293888278120ca7dfa6ee51cc}{S\+P\+L\+::add} (const Sequence2$<$ T $>$ \&f, const Sequence2$<$ 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{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E} Sequence2$<$ T $>$ \hyperlink{group__Sequence2_ga67bc98e4d9e442f8b1b19cd9a0075d43}{S\+P\+L\+::operator+} (const T \&value, const Sequence2$<$ T $>$ \&f)
\begin{DoxyCompactList}\small\item\em Add a value to a sequence. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E} Sequence2$<$ T $>$ \hyperlink{group__Sequence2_ga469e64c2f7a4b9f165fce05ae8febb58}{S\+P\+L\+::operator+} (const Sequence2$<$ T $>$ \&f, const T \&value)
\begin{DoxyCompactList}\small\item\em Add a value to a sequence. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E} Sequence2$<$ T $>$ \hyperlink{group__Sequence2_gaab9ae3f95729d4bdcb55e525f1b44efc}{S\+P\+L\+::operator-\/} (const Sequence2$<$ T $>$ \&f, const T \&value)
\begin{DoxyCompactList}\small\item\em Subtract a value from a sequence. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E} Sequence2$<$ T $>$ \hyperlink{group__Sequence2_ga0399d1590f69284539955754952d0bc2}{S\+P\+L\+::operator$\ast$} (const T \&value, const Sequence2$<$ T $>$ \&f)
\begin{DoxyCompactList}\small\item\em Compute a scalar multiple of a sequence. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E} Sequence2$<$ T $>$ \hyperlink{group__Sequence2_ga5464fa4dfe83a538144b292ac901b882}{S\+P\+L\+::operator$\ast$} (const Sequence2$<$ T $>$ \&f, const T \&value)
\begin{DoxyCompactList}\small\item\em Compute a scalar multiple of a sequence. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E} Sequence2$<$ T $>$ \hyperlink{group__Sequence2_ga7187e89a877111e195d5e1b93c69a4b8}{S\+P\+L\+::operator/} (const Sequence2$<$ T $>$ \&f, const T \&value)
\begin{DoxyCompactList}\small\item\em Divide a sequence by a scalar. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\bool \hyperlink{group__Sequence2_ga496dd6b72eed7345201dcfcccee3ae44}{S\+P\+L\+::operator==} (const Sequence2$<$ T $>$ \&f, const Sequence2$<$ T $>$ \&g)
\begin{DoxyCompactList}\small\item\em Test two sequences for equality. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E} bool \hyperlink{group__Sequence2_ga7dea4eef2d1b3e395ed3bc24fd04c560}{S\+P\+L\+::operator!=} (const Sequence2$<$ T $>$ \&f, const Sequence2$<$ T $>$ \&g)
\begin{DoxyCompactList}\small\item\em Test two sequences for inequality. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E} bool \hyperlink{group__Sequence2_ga9243c5ec6e804216f0ef6c18cbc37c54}{S\+P\+L\+::approx\+Equal} (const Sequence2$<$ T $>$ \&f, const Sequence2$<$ T $>$ \&g, T threshold=1e-\/9)
\begin{DoxyCompactList}\small\item\em Test two sequences for approximate equality. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence2$<$ T $>$ \hyperlink{group__Sequence2_gabab6a1081a39295ddff3de7dae5378d1}{S\+P\+L\+::subsequence} (const Sequence2$<$ T $>$ \&f, int start\+X, int start\+Y, int width, int height)
\begin{DoxyCompactList}\small\item\em Extract a subsequence from a sequence. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\\hyperlink{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E} Sequence2$<$ T $>$ \hyperlink{group__Sequence2_gad3505202e18541b62d6701e1052b7b6b}{S\+P\+L\+::translate} (const Sequence2$<$ T $>$ \&f, int delta\+X, int delta\+Y)
\begin{DoxyCompactList}\small\item\em Translate a sequence by the specified amount. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence2$<$ T $>$ \hyperlink{group__Sequence2_gaca142733c80701cbac73c94a36a22679}{S\+P\+L\+::convolve} (const Sequence2$<$ T $>$ \&f, const Sequence2$<$ T $>$ \&g, int mode)
\begin{DoxyCompactList}\small\item\em Compute the convolution of two sequences. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence2$<$ T $>$ \hyperlink{group__Sequence2_ga82e0e208563319e6626f0a54c3f5068d}{S\+P\+L\+::convolve\+Separable} (const Sequence2$<$ T $>$ \&f, const Sequence1$<$ T $>$ \&horz\+Filt, const Sequence1$<$ T $>$ \&vert\+Filt, int mode=Convolve\+Mode\+::full)
\begin{DoxyCompactList}\small\item\em Compute the convolution of a sequence with two 1-\/\+D filters (i.\+e., convolution with a separable filter). \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence2$<$ T $>$ \hyperlink{group__Sequence2_ga5640de8333283de8c168b004414e514e}{S\+P\+L\+::downsample} (const Sequence2$<$ T $>$ \&f, int factor\+X, int factor\+Y)
\begin{DoxyCompactList}\small\item\em Downsample a sequence in each of the horizontal and vertical directions by the specified factors. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence2$<$ T $>$ \hyperlink{group__Sequence2_ga58d1736fede504d583cf5345742fbc6e}{S\+P\+L\+::upsample} (const Sequence2$<$ T $>$ \&f, int factor\+X, int factor\+Y)
\begin{DoxyCompactList}\small\item\em Upsample a sequence in each of the horizontal and vertical directions by the specified factors. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence2$<$ T $>$ \hyperlink{group__Sequence2_gad3cf936671495a822cd2bf88af5a7100}{S\+P\+L\+::upsample} (const Sequence2$<$ T $>$ \&f, int factor\+X, int factor\+Y, int pad\+X, int pad\+Y)
\begin{DoxyCompactList}\small\item\em Upsample a sequence in each of the horizontal and vertical directions by the specified factors. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Array2$<$ Sequence2$<$ T $>$ $>$ \hyperlink{group__Sequence2_ga2cd5e0170b647a84e54d535b53a37eb5}{S\+P\+L\+::polyphase\+Split} (const Sequence2$<$ T $>$ \&seq, int type\+X, int num\+Phases\+X, int type\+Y, int num\+Phases\+Y)
\begin{DoxyCompactList}\small\item\em Split a sequence into its polyphase components. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Sequence2$<$ T $>$ \hyperlink{group__Sequence2_ga219d553e95d8139285b26e9c4e3bde2b}{S\+P\+L\+::polyphase\+Join} (const Array2$<$ Sequence2$<$ T $>$ $>$ \&comps, int type\+X, int type\+Y)
\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 Sequence2 template class. 



\subsection{Macro Definition Documentation}
\hypertarget{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}{}\index{Sequence2.\+hpp@{Sequence2.\+hpp}!S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E@{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E}}
\index{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E@{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E}!Sequence2.\+hpp@{Sequence2.\+hpp}}
\subsubsection[{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+I\+N\+L\+I\+N\+E~inline}\label{Sequence2_8hpp_a562b331f5a614a7aeecfbb750d4d6c8e}


Allow the inlining of functions. 

\hypertarget{Sequence2_8hpp_a50bdf5ef49d5143c94bcb09cd58ada1d}{}\index{Sequence2.\+hpp@{Sequence2.\+hpp}!S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+U\+S\+E\+\_\+\+N\+E\+W\+\_\+\+C\+O\+N\+V@{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+U\+S\+E\+\_\+\+N\+E\+W\+\_\+\+C\+O\+N\+V}}
\index{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+U\+S\+E\+\_\+\+N\+E\+W\+\_\+\+C\+O\+N\+V@{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+U\+S\+E\+\_\+\+N\+E\+W\+\_\+\+C\+O\+N\+V}!Sequence2.\+hpp@{Sequence2.\+hpp}}
\subsubsection[{S\+P\+L\+\_\+\+S\+E\+Q\+U\+E\+N\+C\+E2\+\_\+\+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\+E2\+\_\+\+U\+S\+E\+\_\+\+N\+E\+W\+\_\+\+C\+O\+N\+V}\label{Sequence2_8hpp_a50bdf5ef49d5143c94bcb09cd58ada1d}


Defining this symbol will enable extra code for debugging. 

Defining this symbol will enable some new code for convolution. 