\hypertarget{a00312}{
\section{mln::p\_\-line2d Class Reference}
\label{d7/df2/a00312}\index{mln::p\_\-line2d@{mln::p\_\-line2d}}
}


2D discrete line of points.  




{\ttfamily \#include $<$p\_\-line2d.hh$>$}



Inherits site\_\-set\_\-base\_\-$<$ point2d, p\_\-line2d $>$.

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef \hyperlink{a00308}{p\_\-indexed\_\-bkd\_\-piter}$<$ \hyperlink{a00312}{self\_\-} $>$ \hyperlink{a00312_a2371192bf74435356f6907a9892c8074}{bkd\_\-piter}
\begin{DoxyCompactList}\small\item\em Backward \hyperlink{a00345}{Site\_\-Iterator} associated type. \item\end{DoxyCompactList}\item 
typedef \hyperlink{a00330}{point2d} \hyperlink{a00312_a883981bcc212381796a34af214d6e5fa}{element}
\begin{DoxyCompactList}\small\item\em Element associated type. \item\end{DoxyCompactList}\item 
typedef \hyperlink{a00309}{p\_\-indexed\_\-fwd\_\-piter}$<$ \hyperlink{a00312}{self\_\-} $>$ \hyperlink{a00312_a18e7956ae26dcce80264e21d20235827}{fwd\_\-piter}
\begin{DoxyCompactList}\small\item\em Forward \hyperlink{a00345}{Site\_\-Iterator} associated type. \item\end{DoxyCompactList}\item 
typedef \hyperlink{a00309}{p\_\-indexed\_\-fwd\_\-piter}$<$ \hyperlink{a00312}{self\_\-} $>$ \hyperlink{a00312_af5fc49e78de010c65af1fc470fb341f5}{piter}
\begin{DoxyCompactList}\small\item\em \hyperlink{a00345}{Site\_\-Iterator} associated type. \item\end{DoxyCompactList}\item 
typedef \hyperlink{a00310}{p\_\-indexed\_\-psite}$<$ \hyperlink{a00312}{self\_\-} $>$ \hyperlink{a00312_a5622827b7a57818180c93a48047130ae}{psite}
\begin{DoxyCompactList}\small\item\em Psite associated type. \item\end{DoxyCompactList}\item 
typedef const \hyperlink{a00135}{box2d} \& \hyperlink{a00312_afde28334261206a22a4f649681f49b99}{q\_\-box}
\begin{DoxyCompactList}\small\item\em \hyperlink{a00028}{Box} (qualified) associated type. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
const \hyperlink{a00135}{box2d} \& \hyperlink{a00312_a86098494566c79e5bcccc84d45671f0e}{bbox} () const 
\begin{DoxyCompactList}\small\item\em Give the exact bounding box. \item\end{DoxyCompactList}\item 
const \hyperlink{a00330}{point2d} \& \hyperlink{a00312_a232d2c056ee6b0ad3fbe354775e25756}{begin} () const 
\begin{DoxyCompactList}\small\item\em Give the point that begins the line. \item\end{DoxyCompactList}\item 
const \hyperlink{a00330}{point2d} \& \hyperlink{a00312_a52635b5e048a39c40f068efcb3657c2d}{end} () const 
\begin{DoxyCompactList}\small\item\em Give the point that ends the line. \item\end{DoxyCompactList}\item 
bool \hyperlink{a00312_a61b91946bd3b830a195e82ab89c0add1}{has} (const util::index \&i) const 
\begin{DoxyCompactList}\small\item\em Test if index {\ttfamily i} belongs to this point set. \item\end{DoxyCompactList}\item 
bool \hyperlink{a00312_acad195f2c0162e571f6158bcd6137572}{has} (const \hyperlink{a00310}{psite} \&p) const 
\begin{DoxyCompactList}\small\item\em Test if {\ttfamily p} belongs to this point set. \item\end{DoxyCompactList}\item 
bool \hyperlink{a00312_a746ff591e15cc62e8365e55edf9a8b99}{is\_\-valid} () const 
\begin{DoxyCompactList}\small\item\em Test if this line is valid, i.e., initialized. \item\end{DoxyCompactList}\item 
std::size\_\-t \hyperlink{a00312_abbc367b57204a8901234a4e111af1b53}{memory\_\-size} () const 
\begin{DoxyCompactList}\small\item\em Return the size of this site set in memory. \item\end{DoxyCompactList}\item 
unsigned \hyperlink{a00312_a4a12b09e19c34492902c54577ea5b8f4}{nsites} () const 
\begin{DoxyCompactList}\small\item\em Give the number of points. \item\end{DoxyCompactList}\item 
const \hyperlink{a00330}{point2d} \& \hyperlink{a00312_a046224a10b560076cb431def801af2eb}{operator\mbox{[}$\,$\mbox{]}} (unsigned i) const 
\begin{DoxyCompactList}\small\item\em Return the {\ttfamily i-\/th} point of the line. \item\end{DoxyCompactList}\item 
\hyperlink{a00312_af4c447d8f685400a6b5e5f3086e6135b}{p\_\-line2d} (const \hyperlink{a00330}{point2d} \&beg, const \hyperlink{a00330}{point2d} \&end, bool is\_\-end\_\-excluded=false)
\begin{DoxyCompactList}\small\item\em Constructor from point {\ttfamily beg} to point {\ttfamily end}. \item\end{DoxyCompactList}\item 
\hyperlink{a00312_a115bca42ad2cf763974f1aa5e1e9defc}{p\_\-line2d} ()
\begin{DoxyCompactList}\small\item\em Constructor without argument. \item\end{DoxyCompactList}\item 
const std::vector$<$ \hyperlink{a00330}{point2d} $>$ \& \hyperlink{a00312_aa46b885764dc58eaceee3533b571c9e3}{std\_\-vector} () const 
\begin{DoxyCompactList}\small\item\em Return the corresponding std::vector of points. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
2D discrete line of points. It is based on \hyperlink{a00300}{p\_\-array}. 

Definition at line 79 of file p\_\-line2d.hh.



\subsection{Member Typedef Documentation}
\hypertarget{a00312_a2371192bf74435356f6907a9892c8074}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!bkd\_\-piter@{bkd\_\-piter}}
\index{bkd\_\-piter@{bkd\_\-piter}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{bkd\_\-piter}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf p\_\-indexed\_\-bkd\_\-piter}$<${\bf self\_\-}$>$ {\bf mln::p\_\-line2d::bkd\_\-piter}}}
\label{d7/df2/a00312_a2371192bf74435356f6907a9892c8074}


Backward \hyperlink{a00345}{Site\_\-Iterator} associated type. 



Definition at line 97 of file p\_\-line2d.hh.

\hypertarget{a00312_a883981bcc212381796a34af214d6e5fa}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!element@{element}}
\index{element@{element}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{element}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf point2d} {\bf mln::p\_\-line2d::element}}}
\label{d7/df2/a00312_a883981bcc212381796a34af214d6e5fa}


Element associated type. 



Definition at line 85 of file p\_\-line2d.hh.

\hypertarget{a00312_a18e7956ae26dcce80264e21d20235827}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!fwd\_\-piter@{fwd\_\-piter}}
\index{fwd\_\-piter@{fwd\_\-piter}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{fwd\_\-piter}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf p\_\-indexed\_\-fwd\_\-piter}$<${\bf self\_\-}$>$ {\bf mln::p\_\-line2d::fwd\_\-piter}}}
\label{d7/df2/a00312_a18e7956ae26dcce80264e21d20235827}


Forward \hyperlink{a00345}{Site\_\-Iterator} associated type. 



Definition at line 94 of file p\_\-line2d.hh.

\hypertarget{a00312_af5fc49e78de010c65af1fc470fb341f5}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!piter@{piter}}
\index{piter@{piter}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{piter}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf p\_\-indexed\_\-fwd\_\-piter}$<${\bf self\_\-}$>$ {\bf mln::p\_\-line2d::piter}}}
\label{d7/df2/a00312_af5fc49e78de010c65af1fc470fb341f5}


\hyperlink{a00345}{Site\_\-Iterator} associated type. 



Definition at line 91 of file p\_\-line2d.hh.

\hypertarget{a00312_a5622827b7a57818180c93a48047130ae}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!psite@{psite}}
\index{psite@{psite}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{psite}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf p\_\-indexed\_\-psite}$<${\bf self\_\-}$>$ {\bf mln::p\_\-line2d::psite}}}
\label{d7/df2/a00312_a5622827b7a57818180c93a48047130ae}


Psite associated type. 



Definition at line 88 of file p\_\-line2d.hh.

\hypertarget{a00312_afde28334261206a22a4f649681f49b99}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!q\_\-box@{q\_\-box}}
\index{q\_\-box@{q\_\-box}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{q\_\-box}]{\setlength{\rightskip}{0pt plus 5cm}typedef const {\bf box2d}\& {\bf mln::p\_\-line2d::q\_\-box}}}
\label{d7/df2/a00312_afde28334261206a22a4f649681f49b99}


\hyperlink{a00028}{Box} (qualified) associated type. 



Definition at line 132 of file p\_\-line2d.hh.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{a00312_a115bca42ad2cf763974f1aa5e1e9defc}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!p\_\-line2d@{p\_\-line2d}}
\index{p\_\-line2d@{p\_\-line2d}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{p\_\-line2d}]{\setlength{\rightskip}{0pt plus 5cm}mln::p\_\-line2d::p\_\-line2d (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df2/a00312_a115bca42ad2cf763974f1aa5e1e9defc}


Constructor without argument. 



Definition at line 161 of file p\_\-line2d.hh.



References is\_\-valid().

\hypertarget{a00312_af4c447d8f685400a6b5e5f3086e6135b}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!p\_\-line2d@{p\_\-line2d}}
\index{p\_\-line2d@{p\_\-line2d}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{p\_\-line2d}]{\setlength{\rightskip}{0pt plus 5cm}mln::p\_\-line2d::p\_\-line2d (
\begin{DoxyParamCaption}
\item[{const {\bf point2d} \&}]{ beg, }
\item[{const {\bf point2d} \&}]{ end, }
\item[{bool}]{ is\_\-end\_\-excluded = {\ttfamily false}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df2/a00312_af4c447d8f685400a6b5e5f3086e6135b}


Constructor from point {\ttfamily beg} to point {\ttfamily end}. 



Definition at line 167 of file p\_\-line2d.hh.



References is\_\-valid().



\subsection{Member Function Documentation}
\hypertarget{a00312_a86098494566c79e5bcccc84d45671f0e}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!bbox@{bbox}}
\index{bbox@{bbox}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{bbox}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf box2d} \& mln::p\_\-line2d::bbox (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df2/a00312_a86098494566c79e5bcccc84d45671f0e}


Give the exact bounding box. 



Definition at line 273 of file p\_\-line2d.hh.



References is\_\-valid().

\hypertarget{a00312_a232d2c056ee6b0ad3fbe354775e25756}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!begin@{begin}}
\index{begin@{begin}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{begin}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf point2d} \& mln::p\_\-line2d::begin (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df2/a00312_a232d2c056ee6b0ad3fbe354775e25756}


Give the point that begins the line. 



Definition at line 307 of file p\_\-line2d.hh.



References is\_\-valid().



Referenced by mln::debug::draw\_\-graph().

\hypertarget{a00312_a52635b5e048a39c40f068efcb3657c2d}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!end@{end}}
\index{end@{end}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{end}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf point2d} \& mln::p\_\-line2d::end (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df2/a00312_a52635b5e048a39c40f068efcb3657c2d}


Give the point that ends the line. 



Definition at line 315 of file p\_\-line2d.hh.



References is\_\-valid(), and nsites().



Referenced by mln::debug::draw\_\-graph().

\hypertarget{a00312_acad195f2c0162e571f6158bcd6137572}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!has@{has}}
\index{has@{has}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{has}]{\setlength{\rightskip}{0pt plus 5cm}bool mln::p\_\-line2d::has (
\begin{DoxyParamCaption}
\item[{const {\bf psite} \&}]{ p}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df2/a00312_acad195f2c0162e571f6158bcd6137572}


Test if {\ttfamily p} belongs to this point set. 



Definition at line 240 of file p\_\-line2d.hh.

\hypertarget{a00312_a61b91946bd3b830a195e82ab89c0add1}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!has@{has}}
\index{has@{has}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{has}]{\setlength{\rightskip}{0pt plus 5cm}bool mln::p\_\-line2d::has (
\begin{DoxyParamCaption}
\item[{const util::index \&}]{ i}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df2/a00312_a61b91946bd3b830a195e82ab89c0add1}


Test if index {\ttfamily i} belongs to this point set. 



Definition at line 251 of file p\_\-line2d.hh.



References nsites().

\hypertarget{a00312_a746ff591e15cc62e8365e55edf9a8b99}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!is\_\-valid@{is\_\-valid}}
\index{is\_\-valid@{is\_\-valid}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{is\_\-valid}]{\setlength{\rightskip}{0pt plus 5cm}bool mln::p\_\-line2d::is\_\-valid (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df2/a00312_a746ff591e15cc62e8365e55edf9a8b99}


Test if this line is valid, i.e., initialized. 



Definition at line 258 of file p\_\-line2d.hh.



References mln::implies().



Referenced by bbox(), begin(), end(), and p\_\-line2d().

\hypertarget{a00312_abbc367b57204a8901234a4e111af1b53}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!memory\_\-size@{memory\_\-size}}
\index{memory\_\-size@{memory\_\-size}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{memory\_\-size}]{\setlength{\rightskip}{0pt plus 5cm}std::size\_\-t mln::p\_\-line2d::memory\_\-size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df2/a00312_abbc367b57204a8901234a4e111af1b53}


Return the size of this site set in memory. 



Definition at line 323 of file p\_\-line2d.hh.

\hypertarget{a00312_a4a12b09e19c34492902c54577ea5b8f4}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!nsites@{nsites}}
\index{nsites@{nsites}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{nsites}]{\setlength{\rightskip}{0pt plus 5cm}unsigned mln::p\_\-line2d::nsites (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df2/a00312_a4a12b09e19c34492902c54577ea5b8f4}


Give the number of points. 



Definition at line 266 of file p\_\-line2d.hh.



Referenced by end(), has(), and operator\mbox{[}$\,$\mbox{]}().

\hypertarget{a00312_a046224a10b560076cb431def801af2eb}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!operator\mbox{[}\mbox{]}@{operator[]}}
\index{operator\mbox{[}\mbox{]}@{operator[]}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{operator[]}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf point2d} \& mln::p\_\-line2d::operator\mbox{[}$\,$\mbox{]} (
\begin{DoxyParamCaption}
\item[{unsigned}]{ i}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df2/a00312_a046224a10b560076cb431def801af2eb}


Return the {\ttfamily i-\/th} point of the line. 



Definition at line 299 of file p\_\-line2d.hh.



References nsites().

\hypertarget{a00312_aa46b885764dc58eaceee3533b571c9e3}{
\index{mln::p\_\-line2d@{mln::p\_\-line2d}!std\_\-vector@{std\_\-vector}}
\index{std\_\-vector@{std\_\-vector}!mln::p_line2d@{mln::p\_\-line2d}}
\subsubsection[{std\_\-vector}]{\setlength{\rightskip}{0pt plus 5cm}const std::vector$<$ {\bf point2d} $>$ \& mln::p\_\-line2d::std\_\-vector (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d7/df2/a00312_aa46b885764dc58eaceee3533b571c9e3}


Return the corresponding std::vector of points. 



Definition at line 281 of file p\_\-line2d.hh.

