\hypertarget{Array2_8hpp}{}\section{Array2.\+hpp File Reference}
\label{Array2_8hpp}\index{Array2.\+hpp@{Array2.\+hpp}}


This file contains the Array2 template class and its supporting code.  


{\ttfamily \#include $<$S\+P\+L/config.\+hpp$>$}\\*
{\ttfamily \#include $<$iostream$>$}\\*
{\ttfamily \#include $<$iomanip$>$}\\*
{\ttfamily \#include $<$fstream$>$}\\*
{\ttfamily \#include $<$vector$>$}\\*
{\ttfamily \#include $<$cassert$>$}\\*
{\ttfamily \#include $<$iterator$>$}\\*
{\ttfamily \#include $<$algorithm$>$}\\*
{\ttfamily \#include $<$numeric$>$}\\*
{\ttfamily \#include $<$boost/iterator/iterator\+\_\+facade.\+hpp$>$}\\*
{\ttfamily \#include $<$S\+P\+L/pnm\+Codec.\+hpp$>$}\\*
{\ttfamily \#include $<$S\+P\+L/misc.\+hpp$>$}\\*
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classSPL_1_1Array2}{S\+P\+L\+::\+Array2$<$ T $>$}
\begin{DoxyCompactList}\small\item\em A two-\/dimensional array class with lazy copying and reference counting. \end{DoxyCompactList}\item 
class \hyperlink{classSPL_1_1Array2}{S\+P\+L\+::\+Array2$<$ T $>$}
\begin{DoxyCompactList}\small\item\em A two-\/dimensional array class with lazy copying and reference counting. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{Array2_8hpp_a3fc40235de61c3af31162ad4a319998d}{S\+P\+L\+\_\+\+A\+R\+R\+A\+Y2\+\_\+\+I\+N\+L\+I\+N\+E}~inline
\begin{DoxyCompactList}\small\item\em Defining this symbol will enable extra code for debugging. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef Array2$<$ double $>$ \hyperlink{group__Array2_ga6f6767386c60b70020a0ae7234f01c4d}{S\+P\+L\+::\+Real\+Array2}
\begin{DoxyCompactList}\small\item\em A two-\/dimensional array with real elements. \end{DoxyCompactList}\item 
typedef Array2$<$ int $>$ \hyperlink{group__Array2_ga1ba969b4ce1ad39ce9f82f28a50fb9e9}{S\+P\+L\+::\+Int\+Array2}
\begin{DoxyCompactList}\small\item\em A two-\/dimensional array with integer elements. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$class T $>$ }\\std\+::ostream \& \hyperlink{group__Array2_gac953c6214899b45c01de2909fb56fe10}{S\+P\+L\+::operator$<$$<$} (std\+::ostream \&out, const Array2$<$ T $>$ \&a)
\begin{DoxyCompactList}\small\item\em Output an array to the specified stream. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\std\+::istream \& \hyperlink{group__Array2_ga92f705cda5901a78e47ccc889a952bac}{S\+P\+L\+::operator$>$$>$} (std\+::istream \&in, Array2$<$ T $>$ \&a)
\begin{DoxyCompactList}\small\item\em Input an array from the specified stream. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\Array2$<$ T $>$ \hyperlink{group__Array2_gafdaa32bb45e93ecd3d17b0e63fd75bb4}{S\+P\+L\+::transpose} (const Array2$<$ T $>$ \&a)
\begin{DoxyCompactList}\small\item\em Get the transpose of the array. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\bool \hyperlink{group__Array2_ga5881c41f91f7ba4feed11827e1bec889}{S\+P\+L\+::operator==} (const Array2$<$ T $>$ \&a, const Array2$<$ T $>$ \&b)
\begin{DoxyCompactList}\small\item\em Test two arrays for equality. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\bool \hyperlink{group__Array2_ga09b6593fb069e49d23056114253fa437}{S\+P\+L\+::operator!=} (const Array2$<$ T $>$ \&a, const Array2$<$ T $>$ \&b)
\begin{DoxyCompactList}\small\item\em Test two arrays for inequality. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\int \hyperlink{group__Image__IO_ga3bf08918a0a39158e0463c11d6dfd979}{S\+P\+L\+::encode\+Pnm} (std\+::ostream \&out\+Stream, const std\+::vector$<$ Array2$<$ T $>$ $>$ \&comps, int max\+Val, bool sgnd, bool binary\+Format=true)
\begin{DoxyCompactList}\small\item\em Output the array as an image in the P\+N\+M format. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\int \hyperlink{group__Image__IO_ga9bb36f5ebfaa8161a71567e87bf63dca}{S\+P\+L\+::encode\+Pbm} (std\+::ostream \&out\+Stream, const Array2$<$ T $>$ \&bits, bool binary\+Format=true)
\begin{DoxyCompactList}\small\item\em Output the array as an image in the P\+N\+M format (P\+B\+M type). \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\int \hyperlink{group__Image__IO_gacd58b7a5b1648f19977140a972685074}{S\+P\+L\+::encode\+Pgm} (std\+::ostream \&out\+Stream, const Array2$<$ T $>$ \&gray, int max\+Val, bool sgnd, bool binary\+Format=true)
\begin{DoxyCompactList}\small\item\em Output the array as an image in the P\+N\+M format (P\+G\+M type). \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\int \hyperlink{group__Image__IO_gac89f5640f3916029947b4051d4a618e6}{S\+P\+L\+::encode\+Ppm} (std\+::ostream \&out\+Stream, const Array2$<$ T $>$ \&red, const Array2$<$ T $>$ \&green, const Array2$<$ T $>$ \&blue, int max\+Val, bool sgnd, bool binary\+Format=true)
\begin{DoxyCompactList}\small\item\em Output the array as an image in the P\+N\+M format (P\+P\+M type). \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\int \hyperlink{group__Image__IO_ga44a2f08f53305d4aaf39e6d040d182ff}{S\+P\+L\+::decode\+Pnm} (std\+::istream \&in\+Stream, std\+::vector$<$ Array2$<$ T $>$ $>$ \&comps, int \&max\+Val, bool \&sgnd)
\begin{DoxyCompactList}\small\item\em Input an array as an image in the P\+N\+M format. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\int \hyperlink{group__Image__IO_gaaddcb788ab53255340d671e063716d7b}{S\+P\+L\+::decode\+Pbm} (std\+::istream \&in\+Stream, Array2$<$ T $>$ \&bits)
\begin{DoxyCompactList}\small\item\em Input an array as an image in the P\+N\+M format. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\int \hyperlink{group__Image__IO_ga0311268cb7bd9bc5cb0c17433572dee5}{S\+P\+L\+::decode\+Pgm} (std\+::istream \&in\+Stream, Array2$<$ T $>$ \&gray, int \&max\+Val, bool \&sgnd)
\begin{DoxyCompactList}\small\item\em Input an array as an image in the P\+N\+M format. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\int \hyperlink{group__Image__IO_gafdefeacb6896106495c0efac2fdd6ef1}{S\+P\+L\+::decode\+Ppm} (std\+::istream \&in\+Stream, Array2$<$ T $>$ \&red, Array2$<$ T $>$ \&green, Array2$<$ T $>$ \&blue, int \&max\+Val, bool \&sgnd)
\begin{DoxyCompactList}\small\item\em Input an array as an image in the P\+N\+M format. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This file contains the Array2 template class and its supporting code. 



\subsection{Macro Definition Documentation}
\hypertarget{Array2_8hpp_a3fc40235de61c3af31162ad4a319998d}{}\index{Array2.\+hpp@{Array2.\+hpp}!S\+P\+L\+\_\+\+A\+R\+R\+A\+Y2\+\_\+\+I\+N\+L\+I\+N\+E@{S\+P\+L\+\_\+\+A\+R\+R\+A\+Y2\+\_\+\+I\+N\+L\+I\+N\+E}}
\index{S\+P\+L\+\_\+\+A\+R\+R\+A\+Y2\+\_\+\+I\+N\+L\+I\+N\+E@{S\+P\+L\+\_\+\+A\+R\+R\+A\+Y2\+\_\+\+I\+N\+L\+I\+N\+E}!Array2.\+hpp@{Array2.\+hpp}}
\subsubsection[{S\+P\+L\+\_\+\+A\+R\+R\+A\+Y2\+\_\+\+I\+N\+L\+I\+N\+E}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\+P\+L\+\_\+\+A\+R\+R\+A\+Y2\+\_\+\+I\+N\+L\+I\+N\+E~inline}\label{Array2_8hpp_a3fc40235de61c3af31162ad4a319998d}


Defining this symbol will enable extra code for debugging. 

Allow the inlining of functions. 