\hypertarget{a00331}{
\section{mln::Point\_\-Site$<$ E $>$ Struct Template Reference}
\label{d8/df7/a00331}\index{mln::Point\_\-Site@{mln::Point\_\-Site}}
}


Base class for implementation classes of the notion of \char`\"{}point site\char`\"{}.  




{\ttfamily \#include $<$point\_\-site.hh$>$}



Inheritance diagram for mln::Point\_\-Site$<$ E $>$:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=196pt]{da/d0f/a03594}
\end{center}
\end{figure}
\subsection*{Related Functions}
(Note that these are not member functions.) \begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename L , typename R $>$ }\\L::dpoint \hyperlink{a00331_ae28d615293215568aae1d76cae9bc2cd}{operator-\/} (const \hyperlink{a00331}{Point\_\-Site}$<$ L $>$ \&lhs, const \hyperlink{a00331}{Point\_\-Site}$<$ R $>$ \&rhs)
\begin{DoxyCompactList}\small\item\em Difference between a couple of point site {\ttfamily lhs} and {\ttfamily rhs}. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename P $>$ }\\std::ostream \& \hyperlink{a00331_a84e60b0fc1724d1b5f39cb00dbcbdd9a}{operator$<$$<$} (std::ostream \&ostr, const \hyperlink{a00331}{Point\_\-Site}$<$ P $>$ \&p)
\begin{DoxyCompactList}\small\item\em Print a point site {\ttfamily p} into the output stream {\ttfamily ostr}. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename L , typename R $>$ }\\bool \hyperlink{a00331_a3f5408fa9c4f01977dde77d7f0743169}{operator==} (const \hyperlink{a00331}{Point\_\-Site}$<$ L $>$ \&lhs, const \hyperlink{a00331}{Point\_\-Site}$<$ R $>$ \&rhs)
\begin{DoxyCompactList}\small\item\em Equality comparison between a couple of point site {\ttfamily lhs} and {\ttfamily rhs}. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename P , typename D $>$ }\\P::point \hyperlink{a00331_a06820855976e3242706016b89982b474}{operator+} (const \hyperlink{a00331}{Point\_\-Site}$<$ P $>$ \&p, const \hyperlink{a00158}{Delta\_\-Point\_\-Site}$<$ D $>$ \&dp)
\begin{DoxyCompactList}\small\item\em Add a delta-\/point {\ttfamily rhs} to a point site {\ttfamily lhs}. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename P , typename D $>$ }\\P::point \hyperlink{a00331_afdd9fcef7ed9a1e659f3f5a67747bee2}{operator-\/} (const \hyperlink{a00331}{Point\_\-Site}$<$ P $>$ \&p, const \hyperlink{a00158}{Delta\_\-Point\_\-Site}$<$ D $>$ \&dp)
\begin{DoxyCompactList}\small\item\em \} \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}


\subsection{Detailed Description}
\subsubsection*{template$<$typename E$>$ struct mln::Point\_\-Site$<$ E $>$}

Base class for implementation classes of the notion of \char`\"{}point site\char`\"{}. A point site (\char`\"{}psite\char`\"{} for short) is an object that allows an efficient access to data associated with a point. A point site is either a point or designates a point.

When a point site is not really a point, it is automatically convertible to the point it designates.

Let us take the example of a 2D image encoded as an array of runs of values. With a point, a pair (row index, column index), retrieving the corresponding pixel value would mean to browse the array of runs to find the value location. That would not be efficient. Conversely, a point site dedicated to this image structure allows for value access in contant time; precisely the proper point site is a pair (index of run, index within the run). 

Definition at line 106 of file point\_\-site.hh.



\subsection{Friends And Related Function Documentation}
\hypertarget{a00331_a06820855976e3242706016b89982b474}{
\index{mln::Point\_\-Site@{mln::Point\_\-Site}!operator+@{operator+}}
\index{operator+@{operator+}!mln::Point_Site@{mln::Point\_\-Site}}
\subsubsection[{operator+}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename D $>$ P::point operator+ (
\begin{DoxyParamCaption}
\item[{const {\bf Point\_\-Site}$<$ P $>$ \&}]{ p, }
\item[{const {\bf Delta\_\-Point\_\-Site}$<$ D $>$ \&}]{ dp}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}related\mbox{]}}}}
\label{d8/df7/a00331_a06820855976e3242706016b89982b474}


Add a delta-\/point {\ttfamily rhs} to a point site {\ttfamily lhs}. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em p}]A point site. \item[\mbox{\tt[in]} {\em dp}]A delta-\/point.\end{DoxyParams}
The type of {\ttfamily dp} has to compatible with the type of {\ttfamily p}.

\begin{DoxyReturn}{Returns}
A point (temporary object).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{a00158}{mln::Delta\_\-Point\_\-Site} 
\end{DoxySeeAlso}


Definition at line 282 of file point\_\-site.hh.

\hypertarget{a00331_afdd9fcef7ed9a1e659f3f5a67747bee2}{
\index{mln::Point\_\-Site@{mln::Point\_\-Site}!operator-\/@{operator-\/}}
\index{operator-\/@{operator-\/}!mln::Point_Site@{mln::Point\_\-Site}}
\subsubsection[{operator-\/}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P , typename D $>$ P::point operator-\/ (
\begin{DoxyParamCaption}
\item[{const {\bf Point\_\-Site}$<$ P $>$ \&}]{ p, }
\item[{const {\bf Delta\_\-Point\_\-Site}$<$ D $>$ \&}]{ dp}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}related\mbox{]}}}}
\label{d8/df7/a00331_afdd9fcef7ed9a1e659f3f5a67747bee2}


\} 

Substract a delta-\/point {\ttfamily dp} to a point site {\ttfamily p}.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em p}]A point site. \item[\mbox{\tt[in]} {\em dp}]A delta-\/point.\end{DoxyParams}
The type of {\ttfamily dp} has to compatible with the type of {\ttfamily p}.

\begin{DoxyReturn}{Returns}
A point (temporary object).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{a00177}{mln::Dpoint} 

\hyperlink{a00158}{mln::Delta\_\-Point\_\-Site} 
\end{DoxySeeAlso}


Definition at line 296 of file point\_\-site.hh.

\hypertarget{a00331_ae28d615293215568aae1d76cae9bc2cd}{
\index{mln::Point\_\-Site@{mln::Point\_\-Site}!operator-\/@{operator-\/}}
\index{operator-\/@{operator-\/}!mln::Point_Site@{mln::Point\_\-Site}}
\subsubsection[{operator-\/}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename L , typename R $>$ L::dpoint operator-\/ (
\begin{DoxyParamCaption}
\item[{const {\bf Point\_\-Site}$<$ L $>$ \&}]{ lhs, }
\item[{const {\bf Point\_\-Site}$<$ R $>$ \&}]{ rhs}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}related\mbox{]}}}}
\label{d8/df7/a00331_ae28d615293215568aae1d76cae9bc2cd}


Difference between a couple of point site {\ttfamily lhs} and {\ttfamily rhs}. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em lhs}]A first point site. \item[\mbox{\tt[in]} {\em rhs}]A second point site.\end{DoxyParams}
\begin{DoxyWarning}{Warning}
There is no type promotion in Milena so the client has to make sure that both points are defined with the same type of coordinates.
\end{DoxyWarning}
\begin{DoxyPrecond}{Precondition}
Both {\ttfamily lhs} and {\ttfamily rhs} have to be defined on the same topology and with the same type of coordinates; otherwise this test does not compile.
\end{DoxyPrecond}
\begin{DoxyPostcond}{Postcondition}
The result, {\ttfamily dp}, is such as {\ttfamily lhs} == {\ttfamily rhs} + {\ttfamily dp}.
\end{DoxyPostcond}
\begin{DoxyReturn}{Returns}
A delta point (temporary object).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{a00158}{mln::Delta\_\-Point\_\-Site} 
\end{DoxySeeAlso}


Definition at line 267 of file point\_\-site.hh.

\hypertarget{a00331_a84e60b0fc1724d1b5f39cb00dbcbdd9a}{
\index{mln::Point\_\-Site@{mln::Point\_\-Site}!operator$<$$<$@{operator$<$$<$}}
\index{operator$<$$<$@{operator$<$$<$}!mln::Point_Site@{mln::Point\_\-Site}}
\subsubsection[{operator$<$$<$}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename P $>$ std::ostream \& operator$<$$<$ (
\begin{DoxyParamCaption}
\item[{std::ostream \&}]{ ostr, }
\item[{const {\bf Point\_\-Site}$<$ P $>$ \&}]{ p}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}related\mbox{]}}}}
\label{d8/df7/a00331_a84e60b0fc1724d1b5f39cb00dbcbdd9a}


Print a point site {\ttfamily p} into the output stream {\ttfamily ostr}. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in,out]} {\em ostr}]An output stream. \item[\mbox{\tt[in]} {\em p}]A point site.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The modified output stream {\ttfamily ostr}. 
\end{DoxyReturn}


Definition at line 311 of file point\_\-site.hh.

\hypertarget{a00331_a3f5408fa9c4f01977dde77d7f0743169}{
\index{mln::Point\_\-Site@{mln::Point\_\-Site}!operator==@{operator==}}
\index{operator==@{operator==}!mln::Point_Site@{mln::Point\_\-Site}}
\subsubsection[{operator==}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename L , typename R $>$ bool operator== (
\begin{DoxyParamCaption}
\item[{const {\bf Point\_\-Site}$<$ L $>$ \&}]{ lhs, }
\item[{const {\bf Point\_\-Site}$<$ R $>$ \&}]{ rhs}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}related\mbox{]}}}}
\label{d8/df7/a00331_a3f5408fa9c4f01977dde77d7f0743169}


Equality comparison between a couple of point site {\ttfamily lhs} and {\ttfamily rhs}. 


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em lhs}]A first point site. \item[\mbox{\tt[in]} {\em rhs}]A second point site.\end{DoxyParams}
\begin{DoxyPrecond}{Precondition}
Both {\ttfamily lhs} and {\ttfamily rhs} have to be defined on the same topology; otherwise this test does not compile.
\end{DoxyPrecond}
\begin{DoxyReturn}{Returns}
True if both point sites have the same coordinates, otherwise false. 
\end{DoxyReturn}


Definition at line 251 of file point\_\-site.hh.

