\hypertarget{structIndexLexicographicPosition}{
\subsection{IndexLexicographicPosition$<$ Cmp, First $>$ Struct Template Reference}
\label{structIndexLexicographicPosition}\index{IndexLexicographicPosition@{IndexLexicographicPosition}}
}


Class for sorting a list of indexes to an array of spots lexicographically according to the 2D positions of the spots.  


\subsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{structIndexLexicographicPosition_aea285af26067efd4d8d999a9ebf82b63}{IndexLexicographicPosition} (const vector$<$ Vector$<$ 4 $>$ $>$ \&s)
\item 
bool \hyperlink{structIndexLexicographicPosition_a85a815b0fad9e63d35aac9a98c777589}{operator()} (int a, int b)
\end{DoxyCompactItemize}
\subsubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
const vector$<$ Vector$<$ 4 $>$ $>$ \& \hyperlink{structIndexLexicographicPosition_ab8f7b6fec381e4e602a35642659b7402}{spots}
\end{DoxyCompactItemize}
\subsubsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static const int \hyperlink{structIndexLexicographicPosition_aceb778fecf14f50f40a3f20f00a16cb1}{Second} = First==2?3:2
\end{DoxyCompactItemize}


\subsubsection{Detailed Description}
\subsubsection*{template$<$class Cmp, int First$>$struct IndexLexicographicPosition$<$ Cmp, First $>$}

Class for sorting a list of indexes to an array of spots lexicographically according to the 2D positions of the spots. 


\begin{DoxyParams}{Parameters}
{\em Cmp} & comparator function to specify less or greater \\
\hline
{\em First} & most significant position index \\
\hline
\end{DoxyParams}


Definition at line 472 of file multispot5.cc.



\subsubsection{Constructor \& Destructor Documentation}
\hypertarget{structIndexLexicographicPosition_aea285af26067efd4d8d999a9ebf82b63}{
\index{IndexLexicographicPosition@{IndexLexicographicPosition}!IndexLexicographicPosition@{IndexLexicographicPosition}}
\index{IndexLexicographicPosition@{IndexLexicographicPosition}!IndexLexicographicPosition@{IndexLexicographicPosition}}
\paragraph[{IndexLexicographicPosition}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Cmp , int First$>$ {\bf IndexLexicographicPosition}$<$ Cmp, First $>$::{\bf IndexLexicographicPosition} (
\begin{DoxyParamCaption}
\item[{const vector$<$ Vector$<$ 4 $>$ $>$ \&}]{s}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{structIndexLexicographicPosition_aea285af26067efd4d8d999a9ebf82b63}

\begin{DoxyParams}{Parameters}
{\em s} & Vector to sort indices of \\
\hline
\end{DoxyParams}


Definition at line 476 of file multispot5.cc.


\begin{DoxyCode}
    :spots(s)
    {}
\end{DoxyCode}


\subsubsection{Member Function Documentation}
\hypertarget{structIndexLexicographicPosition_a85a815b0fad9e63d35aac9a98c777589}{
\index{IndexLexicographicPosition@{IndexLexicographicPosition}!operator()@{operator()}}
\index{operator()@{operator()}!IndexLexicographicPosition@{IndexLexicographicPosition}}
\paragraph[{operator()}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Cmp , int First$>$ bool {\bf IndexLexicographicPosition}$<$ Cmp, First $>$::operator() (
\begin{DoxyParamCaption}
\item[{int}]{a, }
\item[{int}]{b}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{structIndexLexicographicPosition_a85a815b0fad9e63d35aac9a98c777589}


Compare two indexes into the array of spots. 



Definition at line 484 of file multispot5.cc.


\begin{DoxyCode}
    {
        Cmp cmp;

        if(cmp(spots[a][First], spots[b][First]))
            return true;
        else if(spots[a][First] == spots[b][First])
            return cmp(spots[a][Second], spots[b][Second]);
        else
            return false;
    }
\end{DoxyCode}


\subsubsection{Member Data Documentation}
\hypertarget{structIndexLexicographicPosition_ab8f7b6fec381e4e602a35642659b7402}{
\index{IndexLexicographicPosition@{IndexLexicographicPosition}!spots@{spots}}
\index{spots@{spots}!IndexLexicographicPosition@{IndexLexicographicPosition}}
\paragraph[{spots}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Cmp , int First$>$ const vector$<$Vector$<$4$>$ $>$\& {\bf IndexLexicographicPosition}$<$ Cmp, First $>$::{\bf spots}}}
\label{structIndexLexicographicPosition_ab8f7b6fec381e4e602a35642659b7402}


Keep around the array of spots for later comprison. 



Definition at line 473 of file multispot5.cc.

\hypertarget{structIndexLexicographicPosition_aceb778fecf14f50f40a3f20f00a16cb1}{
\index{IndexLexicographicPosition@{IndexLexicographicPosition}!Second@{Second}}
\index{Second@{Second}!IndexLexicographicPosition@{IndexLexicographicPosition}}
\paragraph[{Second}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Cmp , int First$>$ const int {\bf IndexLexicographicPosition}$<$ Cmp, First $>$::{\bf Second} = First==2?3:2\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{structIndexLexicographicPosition_aceb778fecf14f50f40a3f20f00a16cb1}


Second most siginifcant position index for sorting. 



Definition at line 481 of file multispot5.cc.



The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
\item 
\hyperlink{multispot5_8cc}{multispot5.cc}\end{DoxyCompactItemize}
