\hypertarget{a00396}{
\section{mln::util::graph Class Reference}
\label{d9/da1/a00396}\index{mln::util::graph@{mln::util::graph}}
}


Undirected graph.  




{\ttfamily \#include $<$graph.hh$>$}



Inherits graph\_\-base$<$ graph $>$.

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef std::set$<$ edge\_\-data\_\-t $>$ \hyperlink{a00396_aaa833a25d58b1041f07f17e74c3f3e33}{edges\_\-set\_\-t}
\begin{DoxyCompactList}\small\item\em A set to test the presence of a given edge. \item\end{DoxyCompactList}\item 
typedef std::vector$<$ edge\_\-data\_\-t $>$ \hyperlink{a00396_a0e48b2ce448d0f3e78c55a5eca2a5f36}{edges\_\-t}
\begin{DoxyCompactList}\small\item\em The type of the set of edges. \item\end{DoxyCompactList}\item 
typedef std::vector$<$ vertex\_\-data\_\-t $>$ \hyperlink{a00396_a21416ba50b439d82bb057a481077fc63}{vertices\_\-t}
\begin{DoxyCompactList}\small\item\em The type of the set of vertices. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
typedef mln::internal::vertex\_\-fwd\_\-iterator$<$ \hyperlink{a00396}{graph} $>$ \hyperlink{a00396_a6d4f3aa6f41cac604976a635b44cceae}{vertex\_\-fwd\_\-iter}
\begin{DoxyCompactList}\small\item\em \hyperlink{a00046}{Iterator} types

\hyperlink{a00439}{Vertex} iterators. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
typedef mln::internal::vertex\_\-nbh\_\-edge\_\-fwd\_\-iterator$<$ \hyperlink{a00396}{graph} $>$ \hyperlink{a00396_a0f20a0c191fd6dc32d0312b3d5fb7798}{vertex\_\-nbh\_\-edge\_\-fwd\_\-iter}
\begin{DoxyCompactList}\small\item\em \hyperlink{a00439}{Vertex} centered edge iterators. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
typedef mln::internal::vertex\_\-nbh\_\-vertex\_\-fwd\_\-iterator$<$ \hyperlink{a00396}{graph} $>$ \hyperlink{a00396_a49ab5ba7594e2b91ab9e2efc740fe415}{vertex\_\-nbh\_\-vertex\_\-fwd\_\-iter}
\begin{DoxyCompactList}\small\item\em \hyperlink{a00439}{Vertex} centered vertex iterators. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
typedef mln::internal::edge\_\-fwd\_\-iterator$<$ \hyperlink{a00396}{graph} $>$ \hyperlink{a00396_aaf342cfb99cb36ded8ff530d52d4fe4a}{edge\_\-fwd\_\-iter}
\begin{DoxyCompactList}\small\item\em \hyperlink{a00183}{Edge} iterators. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
typedef mln::internal::edge\_\-nbh\_\-edge\_\-fwd\_\-iterator$<$ \hyperlink{a00396}{graph} $>$ \hyperlink{a00396_aedcd2be31f71c8f204aeea3940140901}{edge\_\-nbh\_\-edge\_\-fwd\_\-iter}
\begin{DoxyCompactList}\small\item\em \hyperlink{a00183}{Edge} centered edge iterators. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a00396_ae4a6f614de908bdc1b2f9170a56f9f61}{graph} ()
\item 
\hyperlink{a00396_a63f312cb1dd655a2061b2e204971647c}{graph} (unsigned nvertices)
\begin{DoxyCompactList}\small\item\em Construct a graph with {\ttfamily nvertices} vertices. \item\end{DoxyCompactList}\item 
bool \hyperlink{a00396_ab0c48ecda892106395d72b449b6eaa52}{has\_\-v} (const \hyperlink{a00405}{vertex\_\-id\_\-t} \&id\_\-v) const 
\begin{DoxyCompactList}\small\item\em Check whether a vertex id {\ttfamily id\_\-v} exists in the graph. \item\end{DoxyCompactList}\item 
\hyperlink{a00405}{edge\_\-id\_\-t} \hyperlink{a00396_a873411a1bc97c9b40313ad3748f903f6}{v\_\-ith\_\-nbh\_\-edge} (const \hyperlink{a00405}{vertex\_\-id\_\-t} \&id\_\-v, unsigned i) const 
\begin{DoxyCompactList}\small\item\em Returns the {\ttfamily i} th edge adjacent to the vertex {\ttfamily id\_\-v}. \item\end{DoxyCompactList}\item 
\hyperlink{a00405}{vertex\_\-id\_\-t} \hyperlink{a00396_a79c63969a73c0687aca482b46678807d}{v\_\-ith\_\-nbh\_\-vertex} (const \hyperlink{a00405}{vertex\_\-id\_\-t} \&id\_\-v, unsigned i) const 
\begin{DoxyCompactList}\small\item\em Returns the {\ttfamily i} th vertex adjacent to the vertex {\ttfamily id\_\-v}. \item\end{DoxyCompactList}\item 
size\_\-t \hyperlink{a00396_a3e5be90f8348efcd099962af368692c2}{v\_\-nmax} () const 
\begin{DoxyCompactList}\small\item\em Return the number of vertices in the graph. \item\end{DoxyCompactList}\item 
size\_\-t \hyperlink{a00396_a1a062a51f58005ea2f6e65536abdc0cf}{v\_\-nmax\_\-nbh\_\-edges} (const \hyperlink{a00405}{vertex\_\-id\_\-t} \&id\_\-v) const 
\begin{DoxyCompactList}\small\item\em Return the number of adjacent edges of vertex {\ttfamily id\_\-v}. \item\end{DoxyCompactList}\item 
size\_\-t \hyperlink{a00396_a972e02f0bb948895771ee571229cba5d}{v\_\-nmax\_\-nbh\_\-vertices} (const \hyperlink{a00405}{vertex\_\-id\_\-t} \&id\_\-v) const 
\begin{DoxyCompactList}\small\item\em Return the number of adjacent vertices of vertex {\ttfamily id\_\-v}. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
unsigned \hyperlink{a00396_a0754a8b414593a87d051f3c9adef7738}{add\_\-vertex} ()
\begin{DoxyCompactList}\small\item\em \hyperlink{a00439}{Vertex} oriented. \item\end{DoxyCompactList}\item 
std::pair$<$ \hyperlink{a00405}{vertex\_\-id\_\-t}, \hyperlink{a00405}{vertex\_\-id\_\-t} $>$ \hyperlink{a00396_a20a44d9e6bf2997987ef82985de516f1}{add\_\-vertices} (unsigned n)
\begin{DoxyCompactList}\small\item\em Add {\ttfamily n} vertices to the graph. \item\end{DoxyCompactList}\item 
vertex\_\-t \hyperlink{a00396_af40b891dc71b77906be6653806a14e38}{vertex} (\hyperlink{a00405}{vertex\_\-id\_\-t} id\_\-v) const 
\begin{DoxyCompactList}\small\item\em Return the vertex whose id is {\itshape v\/}. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}
\begin{Indent}{\bf }\par
{\em \label{_amgrpd41d8cd98f00b204e9800998ecf8427e}
 }\begin{DoxyCompactItemize}
\item 
\hyperlink{a00405}{edge\_\-id\_\-t} \hyperlink{a00396_ae3c021029e3dde73df37d692b35748e5}{add\_\-edge} (const \hyperlink{a00405}{vertex\_\-id\_\-t} \&id\_\-v1, const \hyperlink{a00405}{vertex\_\-id\_\-t} \&id\_\-v2)
\begin{DoxyCompactList}\small\item\em \hyperlink{a00183}{Edge} oriented. \item\end{DoxyCompactList}\item 
edge\_\-t \hyperlink{a00396_a806d6b933dd2092b2981eeebf9264c9c}{edge} (const \hyperlink{a00405}{edge\_\-id\_\-t} \&e) const 
\begin{DoxyCompactList}\small\item\em Return the edge whose id is {\itshape e\/}. \item\end{DoxyCompactList}\item 
const std::vector$<$ \hyperlink{a00407}{util::ord\_\-pair}$<$ \hyperlink{a00405}{vertex\_\-id\_\-t} $>$ $>$ \& \hyperlink{a00396_af747838ef8f3028ee0ff4f1d2a937ba2}{edges} () const 
\begin{DoxyCompactList}\small\item\em Return the list of all edges. \item\end{DoxyCompactList}\item 
size\_\-t \hyperlink{a00396_ab9ca5cbb66726934582a567fc455a602}{e\_\-nmax} () const 
\begin{DoxyCompactList}\small\item\em Return the number of edges in the graph. \item\end{DoxyCompactList}\item 
bool \hyperlink{a00396_a85c92f41969bb1293c2b969927308f1d}{has\_\-e} (const \hyperlink{a00405}{edge\_\-id\_\-t} \&id\_\-e) const 
\begin{DoxyCompactList}\small\item\em Return whether {\ttfamily id\_\-e} is in the graph. \item\end{DoxyCompactList}\item 
edge\_\-t \hyperlink{a00396_a58ddb7eaa259122b397073f1ed09d8e3}{edge} (const vertex\_\-t \&v1, const vertex\_\-t \&v2) const 
\begin{DoxyCompactList}\small\item\em Return the corresponding edge id if exists. \item\end{DoxyCompactList}\item 
\hyperlink{a00405}{vertex\_\-id\_\-t} \hyperlink{a00396_a160438a6c9c28c0008b410a20da5e379}{v1} (const \hyperlink{a00405}{edge\_\-id\_\-t} \&id\_\-e) const 
\begin{DoxyCompactList}\small\item\em Return the first vertex associated to the edge {\ttfamily id\_\-e}. \item\end{DoxyCompactList}\item 
\hyperlink{a00405}{vertex\_\-id\_\-t} \hyperlink{a00396_a95949d52679e7162b39cfe16b24a94f3}{v2} (const \hyperlink{a00405}{edge\_\-id\_\-t} \&id\_\-e) const 
\begin{DoxyCompactList}\small\item\em Return the second vertex associated to edge {\ttfamily id\_\-e}. \item\end{DoxyCompactList}\item 
size\_\-t \hyperlink{a00396_aab7f33d94ae3746f3a51d7314907f675}{e\_\-nmax\_\-nbh\_\-edges} (const \hyperlink{a00405}{edge\_\-id\_\-t} \&id\_\-e) const 
\begin{DoxyCompactList}\small\item\em Return the number max of adjacent edge, given an edge {\ttfamily id\_\-e}. \item\end{DoxyCompactList}\item 
\hyperlink{a00405}{edge\_\-id\_\-t} \hyperlink{a00396_a47ae02d6b8cb5c343fe869c8e7568dd4}{e\_\-ith\_\-nbh\_\-edge} (const \hyperlink{a00405}{edge\_\-id\_\-t} \&id\_\-e, unsigned i) const 
\begin{DoxyCompactList}\small\item\em Return the {\ttfamily i} th edge adjacent to the edge {\ttfamily id\_\-e}. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename G2 $>$ }\\bool \hyperlink{a00396_a61842cebcdeca6733d36020120b0d9a4}{is\_\-subgraph\_\-of} (const G2 \&g) const 
\begin{DoxyCompactList}\small\item\em Return whether this graph is a subgraph Return true if g and $\ast$this have the same graph\_\-id. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\end{Indent}


\subsection{Detailed Description}
Undirected graph. 

Definition at line 87 of file mln/util/graph.hh.



\subsection{Member Typedef Documentation}
\hypertarget{a00396_aaf342cfb99cb36ded8ff530d52d4fe4a}{
\index{mln::util::graph@{mln::util::graph}!edge\_\-fwd\_\-iter@{edge\_\-fwd\_\-iter}}
\index{edge\_\-fwd\_\-iter@{edge\_\-fwd\_\-iter}!mln::util::graph@{mln::util::graph}}
\subsubsection[{edge\_\-fwd\_\-iter}]{\setlength{\rightskip}{0pt plus 5cm}typedef mln::internal::edge\_\-fwd\_\-iterator$<${\bf graph}$>$ {\bf mln::util::graph::edge\_\-fwd\_\-iter}}}
\label{d9/da1/a00396_aaf342cfb99cb36ded8ff530d52d4fe4a}


\hyperlink{a00183}{Edge} iterators. 



Definition at line 129 of file mln/util/graph.hh.

\hypertarget{a00396_aedcd2be31f71c8f204aeea3940140901}{
\index{mln::util::graph@{mln::util::graph}!edge\_\-nbh\_\-edge\_\-fwd\_\-iter@{edge\_\-nbh\_\-edge\_\-fwd\_\-iter}}
\index{edge\_\-nbh\_\-edge\_\-fwd\_\-iter@{edge\_\-nbh\_\-edge\_\-fwd\_\-iter}!mln::util::graph@{mln::util::graph}}
\subsubsection[{edge\_\-nbh\_\-edge\_\-fwd\_\-iter}]{\setlength{\rightskip}{0pt plus 5cm}typedef mln::internal::edge\_\-nbh\_\-edge\_\-fwd\_\-iterator$<${\bf graph}$>$ {\bf mln::util::graph::edge\_\-nbh\_\-edge\_\-fwd\_\-iter}}}
\label{d9/da1/a00396_aedcd2be31f71c8f204aeea3940140901}


\hyperlink{a00183}{Edge} centered edge iterators. 



Definition at line 136 of file mln/util/graph.hh.

\hypertarget{a00396_aaa833a25d58b1041f07f17e74c3f3e33}{
\index{mln::util::graph@{mln::util::graph}!edges\_\-set\_\-t@{edges\_\-set\_\-t}}
\index{edges\_\-set\_\-t@{edges\_\-set\_\-t}!mln::util::graph@{mln::util::graph}}
\subsubsection[{edges\_\-set\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}typedef std::set$<$edge\_\-data\_\-t$>$ {\bf mln::util::graph::edges\_\-set\_\-t}}}
\label{d9/da1/a00396_aaa833a25d58b1041f07f17e74c3f3e33}


A set to test the presence of a given edge. 



Definition at line 102 of file mln/util/graph.hh.

\hypertarget{a00396_a0e48b2ce448d0f3e78c55a5eca2a5f36}{
\index{mln::util::graph@{mln::util::graph}!edges\_\-t@{edges\_\-t}}
\index{edges\_\-t@{edges\_\-t}!mln::util::graph@{mln::util::graph}}
\subsubsection[{edges\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}typedef std::vector$<$edge\_\-data\_\-t$>$ {\bf mln::util::graph::edges\_\-t}}}
\label{d9/da1/a00396_a0e48b2ce448d0f3e78c55a5eca2a5f36}


The type of the set of edges. 



Definition at line 100 of file mln/util/graph.hh.

\hypertarget{a00396_a6d4f3aa6f41cac604976a635b44cceae}{
\index{mln::util::graph@{mln::util::graph}!vertex\_\-fwd\_\-iter@{vertex\_\-fwd\_\-iter}}
\index{vertex\_\-fwd\_\-iter@{vertex\_\-fwd\_\-iter}!mln::util::graph@{mln::util::graph}}
\subsubsection[{vertex\_\-fwd\_\-iter}]{\setlength{\rightskip}{0pt plus 5cm}typedef mln::internal::vertex\_\-fwd\_\-iterator$<${\bf graph}$>$ {\bf mln::util::graph::vertex\_\-fwd\_\-iter}}}
\label{d9/da1/a00396_a6d4f3aa6f41cac604976a635b44cceae}


\hyperlink{a00046}{Iterator} types

\hyperlink{a00439}{Vertex} iterators. 



Definition at line 108 of file mln/util/graph.hh.

\hypertarget{a00396_a0f20a0c191fd6dc32d0312b3d5fb7798}{
\index{mln::util::graph@{mln::util::graph}!vertex\_\-nbh\_\-edge\_\-fwd\_\-iter@{vertex\_\-nbh\_\-edge\_\-fwd\_\-iter}}
\index{vertex\_\-nbh\_\-edge\_\-fwd\_\-iter@{vertex\_\-nbh\_\-edge\_\-fwd\_\-iter}!mln::util::graph@{mln::util::graph}}
\subsubsection[{vertex\_\-nbh\_\-edge\_\-fwd\_\-iter}]{\setlength{\rightskip}{0pt plus 5cm}typedef mln::internal::vertex\_\-nbh\_\-edge\_\-fwd\_\-iterator$<${\bf graph}$>$ {\bf mln::util::graph::vertex\_\-nbh\_\-edge\_\-fwd\_\-iter}}}
\label{d9/da1/a00396_a0f20a0c191fd6dc32d0312b3d5fb7798}


\hyperlink{a00439}{Vertex} centered edge iterators. 



Definition at line 115 of file mln/util/graph.hh.

\hypertarget{a00396_a49ab5ba7594e2b91ab9e2efc740fe415}{
\index{mln::util::graph@{mln::util::graph}!vertex\_\-nbh\_\-vertex\_\-fwd\_\-iter@{vertex\_\-nbh\_\-vertex\_\-fwd\_\-iter}}
\index{vertex\_\-nbh\_\-vertex\_\-fwd\_\-iter@{vertex\_\-nbh\_\-vertex\_\-fwd\_\-iter}!mln::util::graph@{mln::util::graph}}
\subsubsection[{vertex\_\-nbh\_\-vertex\_\-fwd\_\-iter}]{\setlength{\rightskip}{0pt plus 5cm}typedef mln::internal::vertex\_\-nbh\_\-vertex\_\-fwd\_\-iterator$<${\bf graph}$>$ {\bf mln::util::graph::vertex\_\-nbh\_\-vertex\_\-fwd\_\-iter}}}
\label{d9/da1/a00396_a49ab5ba7594e2b91ab9e2efc740fe415}


\hyperlink{a00439}{Vertex} centered vertex iterators. 



Definition at line 122 of file mln/util/graph.hh.

\hypertarget{a00396_a21416ba50b439d82bb057a481077fc63}{
\index{mln::util::graph@{mln::util::graph}!vertices\_\-t@{vertices\_\-t}}
\index{vertices\_\-t@{vertices\_\-t}!mln::util::graph@{mln::util::graph}}
\subsubsection[{vertices\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}typedef std::vector$<$vertex\_\-data\_\-t$>$ {\bf mln::util::graph::vertices\_\-t}}}
\label{d9/da1/a00396_a21416ba50b439d82bb057a481077fc63}


The type of the set of vertices. 



Definition at line 97 of file mln/util/graph.hh.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{a00396_ae4a6f614de908bdc1b2f9170a56f9f61}{
\index{mln::util::graph@{mln::util::graph}!graph@{graph}}
\index{graph@{graph}!mln::util::graph@{mln::util::graph}}
\subsubsection[{graph}]{\setlength{\rightskip}{0pt plus 5cm}mln::util::graph::graph (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_ae4a6f614de908bdc1b2f9170a56f9f61}
Constructor. 

Definition at line 282 of file mln/util/graph.hh.

\hypertarget{a00396_a63f312cb1dd655a2061b2e204971647c}{
\index{mln::util::graph@{mln::util::graph}!graph@{graph}}
\index{graph@{graph}!mln::util::graph@{mln::util::graph}}
\subsubsection[{graph}]{\setlength{\rightskip}{0pt plus 5cm}mln::util::graph::graph (
\begin{DoxyParamCaption}
\item[{unsigned}]{ nvertices}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a63f312cb1dd655a2061b2e204971647c}


Construct a graph with {\ttfamily nvertices} vertices. 



Definition at line 288 of file mln/util/graph.hh.



\subsection{Member Function Documentation}
\hypertarget{a00396_ae3c021029e3dde73df37d692b35748e5}{
\index{mln::util::graph@{mln::util::graph}!add\_\-edge@{add\_\-edge}}
\index{add\_\-edge@{add\_\-edge}!mln::util::graph@{mln::util::graph}}
\subsubsection[{add\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}{\bf edge\_\-id\_\-t} mln::util::graph::add\_\-edge (
\begin{DoxyParamCaption}
\item[{const {\bf vertex\_\-id\_\-t} \&}]{ id\_\-v1, }
\item[{const {\bf vertex\_\-id\_\-t} \&}]{ id\_\-v2}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_ae3c021029e3dde73df37d692b35748e5}


\hyperlink{a00183}{Edge} oriented. 

Add an edge.

\begin{DoxyReturn}{Returns}
The id of the new edge if it does not exist yet; otherwise, return {\ttfamily mln\_\-max(unsigned)}. 
\end{DoxyReturn}


Definition at line 386 of file mln/util/graph.hh.



References edge(), and has\_\-v().



Referenced by mln::make::voronoi().

\hypertarget{a00396_a0754a8b414593a87d051f3c9adef7738}{
\index{mln::util::graph@{mln::util::graph}!add\_\-vertex@{add\_\-vertex}}
\index{add\_\-vertex@{add\_\-vertex}!mln::util::graph@{mln::util::graph}}
\subsubsection[{add\_\-vertex}]{\setlength{\rightskip}{0pt plus 5cm}unsigned mln::util::graph::add\_\-vertex (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a0754a8b414593a87d051f3c9adef7738}


\hyperlink{a00439}{Vertex} oriented. 

Shortcuts factoring the insertion of vertices and edges. Add a vertex.

\begin{DoxyReturn}{Returns}
The id of the new vertex. 
\end{DoxyReturn}


Definition at line 299 of file mln/util/graph.hh.



References v\_\-nmax().



Referenced by mln::make::voronoi().

\hypertarget{a00396_a20a44d9e6bf2997987ef82985de516f1}{
\index{mln::util::graph@{mln::util::graph}!add\_\-vertices@{add\_\-vertices}}
\index{add\_\-vertices@{add\_\-vertices}!mln::util::graph@{mln::util::graph}}
\subsubsection[{add\_\-vertices}]{\setlength{\rightskip}{0pt plus 5cm}std::pair$<$ {\bf vertex\_\-id\_\-t}, {\bf vertex\_\-id\_\-t} $>$ mln::util::graph::add\_\-vertices (
\begin{DoxyParamCaption}
\item[{unsigned}]{ n}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a20a44d9e6bf2997987ef82985de516f1}


Add {\ttfamily n} vertices to the graph. 

\begin{DoxyReturn}{Returns}
A range of vertex ids. 
\end{DoxyReturn}


Definition at line 310 of file mln/util/graph.hh.



References v\_\-nmax().

\hypertarget{a00396_a47ae02d6b8cb5c343fe869c8e7568dd4}{
\index{mln::util::graph@{mln::util::graph}!e\_\-ith\_\-nbh\_\-edge@{e\_\-ith\_\-nbh\_\-edge}}
\index{e\_\-ith\_\-nbh\_\-edge@{e\_\-ith\_\-nbh\_\-edge}!mln::util::graph@{mln::util::graph}}
\subsubsection[{e\_\-ith\_\-nbh\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}{\bf edge\_\-id\_\-t} mln::util::graph::e\_\-ith\_\-nbh\_\-edge (
\begin{DoxyParamCaption}
\item[{const {\bf edge\_\-id\_\-t} \&}]{ id\_\-e, }
\item[{unsigned}]{ i}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a47ae02d6b8cb5c343fe869c8e7568dd4}


Return the {\ttfamily i} th edge adjacent to the edge {\ttfamily id\_\-e}. 



Definition at line 503 of file mln/util/graph.hh.



References e\_\-nmax(), e\_\-nmax\_\-nbh\_\-edges(), has\_\-e(), v1(), v2(), v\_\-ith\_\-nbh\_\-edge(), and v\_\-nmax\_\-nbh\_\-edges().

\hypertarget{a00396_ab9ca5cbb66726934582a567fc455a602}{
\index{mln::util::graph@{mln::util::graph}!e\_\-nmax@{e\_\-nmax}}
\index{e\_\-nmax@{e\_\-nmax}!mln::util::graph@{mln::util::graph}}
\subsubsection[{e\_\-nmax}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t mln::util::graph::e\_\-nmax (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_ab9ca5cbb66726934582a567fc455a602}


Return the number of edges in the graph. 



Definition at line 443 of file mln/util/graph.hh.



Referenced by e\_\-ith\_\-nbh\_\-edge(), and edge().

\hypertarget{a00396_aab7f33d94ae3746f3a51d7314907f675}{
\index{mln::util::graph@{mln::util::graph}!e\_\-nmax\_\-nbh\_\-edges@{e\_\-nmax\_\-nbh\_\-edges}}
\index{e\_\-nmax\_\-nbh\_\-edges@{e\_\-nmax\_\-nbh\_\-edges}!mln::util::graph@{mln::util::graph}}
\subsubsection[{e\_\-nmax\_\-nbh\_\-edges}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t mln::util::graph::e\_\-nmax\_\-nbh\_\-edges (
\begin{DoxyParamCaption}
\item[{const {\bf edge\_\-id\_\-t} \&}]{ id\_\-e}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_aab7f33d94ae3746f3a51d7314907f675}


Return the number max of adjacent edge, given an edge {\ttfamily id\_\-e}. 



Definition at line 495 of file mln/util/graph.hh.



References has\_\-e(), v1(), v2(), and v\_\-nmax\_\-nbh\_\-edges().



Referenced by e\_\-ith\_\-nbh\_\-edge().

\hypertarget{a00396_a806d6b933dd2092b2981eeebf9264c9c}{
\index{mln::util::graph@{mln::util::graph}!edge@{edge}}
\index{edge@{edge}!mln::util::graph@{mln::util::graph}}
\subsubsection[{edge}]{\setlength{\rightskip}{0pt plus 5cm}graph::edge\_\-t mln::util::graph::edge (
\begin{DoxyParamCaption}
\item[{const {\bf edge\_\-id\_\-t} \&}]{ e}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a806d6b933dd2092b2981eeebf9264c9c}


Return the edge whose id is {\itshape e\/}. 



Definition at line 435 of file mln/util/graph.hh.



References e\_\-nmax().



Referenced by add\_\-edge().

\hypertarget{a00396_a58ddb7eaa259122b397073f1ed09d8e3}{
\index{mln::util::graph@{mln::util::graph}!edge@{edge}}
\index{edge@{edge}!mln::util::graph@{mln::util::graph}}
\subsubsection[{edge}]{\setlength{\rightskip}{0pt plus 5cm}graph::edge\_\-t mln::util::graph::edge (
\begin{DoxyParamCaption}
\item[{const vertex\_\-t \&}]{ v1, }
\item[{const vertex\_\-t \&}]{ v2}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a58ddb7eaa259122b397073f1ed09d8e3}


Return the corresponding edge id if exists. 

If it is not, returns an invalid edge. 

Definition at line 457 of file mln/util/graph.hh.



References has\_\-v().

\hypertarget{a00396_af747838ef8f3028ee0ff4f1d2a937ba2}{
\index{mln::util::graph@{mln::util::graph}!edges@{edges}}
\index{edges@{edges}!mln::util::graph@{mln::util::graph}}
\subsubsection[{edges}]{\setlength{\rightskip}{0pt plus 5cm}const std::vector$<$ {\bf util::ord\_\-pair}$<$ {\bf vertex\_\-id\_\-t} $>$ $>$ \& mln::util::graph::edges (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_af747838ef8f3028ee0ff4f1d2a937ba2}


Return the list of all edges. 



Definition at line 428 of file mln/util/graph.hh.

\hypertarget{a00396_a85c92f41969bb1293c2b969927308f1d}{
\index{mln::util::graph@{mln::util::graph}!has\_\-e@{has\_\-e}}
\index{has\_\-e@{has\_\-e}!mln::util::graph@{mln::util::graph}}
\subsubsection[{has\_\-e}]{\setlength{\rightskip}{0pt plus 5cm}bool mln::util::graph::has\_\-e (
\begin{DoxyParamCaption}
\item[{const {\bf edge\_\-id\_\-t} \&}]{ id\_\-e}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a85c92f41969bb1293c2b969927308f1d}


Return whether {\ttfamily id\_\-e} is in the graph. 



Definition at line 450 of file mln/util/graph.hh.



Referenced by e\_\-ith\_\-nbh\_\-edge(), e\_\-nmax\_\-nbh\_\-edges(), v1(), and v2().

\hypertarget{a00396_ab0c48ecda892106395d72b449b6eaa52}{
\index{mln::util::graph@{mln::util::graph}!has\_\-v@{has\_\-v}}
\index{has\_\-v@{has\_\-v}!mln::util::graph@{mln::util::graph}}
\subsubsection[{has\_\-v}]{\setlength{\rightskip}{0pt plus 5cm}bool mln::util::graph::has\_\-v (
\begin{DoxyParamCaption}
\item[{const {\bf vertex\_\-id\_\-t} \&}]{ id\_\-v}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_ab0c48ecda892106395d72b449b6eaa52}


Check whether a vertex id {\ttfamily id\_\-v} exists in the graph. 



Definition at line 338 of file mln/util/graph.hh.



Referenced by add\_\-edge(), edge(), v\_\-ith\_\-nbh\_\-edge(), v\_\-ith\_\-nbh\_\-vertex(), v\_\-nmax\_\-nbh\_\-edges(), v\_\-nmax\_\-nbh\_\-vertices(), and vertex().

\hypertarget{a00396_a61842cebcdeca6733d36020120b0d9a4}{
\index{mln::util::graph@{mln::util::graph}!is\_\-subgraph\_\-of@{is\_\-subgraph\_\-of}}
\index{is\_\-subgraph\_\-of@{is\_\-subgraph\_\-of}!mln::util::graph@{mln::util::graph}}
\subsubsection[{is\_\-subgraph\_\-of}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename G2 $>$ bool mln::util::graph::is\_\-subgraph\_\-of (
\begin{DoxyParamCaption}
\item[{const G2 \&}]{ g}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a61842cebcdeca6733d36020120b0d9a4}


Return whether this graph is a subgraph Return true if g and $\ast$this have the same graph\_\-id. 



Definition at line 519 of file mln/util/graph.hh.

\hypertarget{a00396_a160438a6c9c28c0008b410a20da5e379}{
\index{mln::util::graph@{mln::util::graph}!v1@{v1}}
\index{v1@{v1}!mln::util::graph@{mln::util::graph}}
\subsubsection[{v1}]{\setlength{\rightskip}{0pt plus 5cm}{\bf vertex\_\-id\_\-t} mln::util::graph::v1 (
\begin{DoxyParamCaption}
\item[{const {\bf edge\_\-id\_\-t} \&}]{ id\_\-e}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a160438a6c9c28c0008b410a20da5e379}


Return the first vertex associated to the edge {\ttfamily id\_\-e}. 



Definition at line 479 of file mln/util/graph.hh.



References has\_\-e().



Referenced by e\_\-ith\_\-nbh\_\-edge(), and e\_\-nmax\_\-nbh\_\-edges().

\hypertarget{a00396_a95949d52679e7162b39cfe16b24a94f3}{
\index{mln::util::graph@{mln::util::graph}!v2@{v2}}
\index{v2@{v2}!mln::util::graph@{mln::util::graph}}
\subsubsection[{v2}]{\setlength{\rightskip}{0pt plus 5cm}{\bf vertex\_\-id\_\-t} mln::util::graph::v2 (
\begin{DoxyParamCaption}
\item[{const {\bf edge\_\-id\_\-t} \&}]{ id\_\-e}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a95949d52679e7162b39cfe16b24a94f3}


Return the second vertex associated to edge {\ttfamily id\_\-e}. 



Definition at line 487 of file mln/util/graph.hh.



References has\_\-e().



Referenced by e\_\-ith\_\-nbh\_\-edge(), and e\_\-nmax\_\-nbh\_\-edges().

\hypertarget{a00396_a873411a1bc97c9b40313ad3748f903f6}{
\index{mln::util::graph@{mln::util::graph}!v\_\-ith\_\-nbh\_\-edge@{v\_\-ith\_\-nbh\_\-edge}}
\index{v\_\-ith\_\-nbh\_\-edge@{v\_\-ith\_\-nbh\_\-edge}!mln::util::graph@{mln::util::graph}}
\subsubsection[{v\_\-ith\_\-nbh\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}{\bf edge\_\-id\_\-t} mln::util::graph::v\_\-ith\_\-nbh\_\-edge (
\begin{DoxyParamCaption}
\item[{const {\bf vertex\_\-id\_\-t} \&}]{ id\_\-v, }
\item[{unsigned}]{ i}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a873411a1bc97c9b40313ad3748f903f6}


Returns the {\ttfamily i} th edge adjacent to the vertex {\ttfamily id\_\-v}. 



Definition at line 353 of file mln/util/graph.hh.



References has\_\-v(), and v\_\-nmax\_\-nbh\_\-edges().



Referenced by e\_\-ith\_\-nbh\_\-edge(), and v\_\-ith\_\-nbh\_\-vertex().

\hypertarget{a00396_a79c63969a73c0687aca482b46678807d}{
\index{mln::util::graph@{mln::util::graph}!v\_\-ith\_\-nbh\_\-vertex@{v\_\-ith\_\-nbh\_\-vertex}}
\index{v\_\-ith\_\-nbh\_\-vertex@{v\_\-ith\_\-nbh\_\-vertex}!mln::util::graph@{mln::util::graph}}
\subsubsection[{v\_\-ith\_\-nbh\_\-vertex}]{\setlength{\rightskip}{0pt plus 5cm}{\bf vertex\_\-id\_\-t} mln::util::graph::v\_\-ith\_\-nbh\_\-vertex (
\begin{DoxyParamCaption}
\item[{const {\bf vertex\_\-id\_\-t} \&}]{ id\_\-v, }
\item[{unsigned}]{ i}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a79c63969a73c0687aca482b46678807d}


Returns the {\ttfamily i} th vertex adjacent to the vertex {\ttfamily id\_\-v}. 



Definition at line 371 of file mln/util/graph.hh.



References has\_\-v(), and v\_\-ith\_\-nbh\_\-edge().

\hypertarget{a00396_a3e5be90f8348efcd099962af368692c2}{
\index{mln::util::graph@{mln::util::graph}!v\_\-nmax@{v\_\-nmax}}
\index{v\_\-nmax@{v\_\-nmax}!mln::util::graph@{mln::util::graph}}
\subsubsection[{v\_\-nmax}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t mln::util::graph::v\_\-nmax (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a3e5be90f8348efcd099962af368692c2}


Return the number of vertices in the graph. 



Definition at line 331 of file mln/util/graph.hh.



Referenced by add\_\-vertex(), and add\_\-vertices().

\hypertarget{a00396_a1a062a51f58005ea2f6e65536abdc0cf}{
\index{mln::util::graph@{mln::util::graph}!v\_\-nmax\_\-nbh\_\-edges@{v\_\-nmax\_\-nbh\_\-edges}}
\index{v\_\-nmax\_\-nbh\_\-edges@{v\_\-nmax\_\-nbh\_\-edges}!mln::util::graph@{mln::util::graph}}
\subsubsection[{v\_\-nmax\_\-nbh\_\-edges}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t mln::util::graph::v\_\-nmax\_\-nbh\_\-edges (
\begin{DoxyParamCaption}
\item[{const {\bf vertex\_\-id\_\-t} \&}]{ id\_\-v}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a1a062a51f58005ea2f6e65536abdc0cf}


Return the number of adjacent edges of vertex {\ttfamily id\_\-v}. 



Definition at line 345 of file mln/util/graph.hh.



References has\_\-v().



Referenced by e\_\-ith\_\-nbh\_\-edge(), e\_\-nmax\_\-nbh\_\-edges(), v\_\-ith\_\-nbh\_\-edge(), and v\_\-nmax\_\-nbh\_\-vertices().

\hypertarget{a00396_a972e02f0bb948895771ee571229cba5d}{
\index{mln::util::graph@{mln::util::graph}!v\_\-nmax\_\-nbh\_\-vertices@{v\_\-nmax\_\-nbh\_\-vertices}}
\index{v\_\-nmax\_\-nbh\_\-vertices@{v\_\-nmax\_\-nbh\_\-vertices}!mln::util::graph@{mln::util::graph}}
\subsubsection[{v\_\-nmax\_\-nbh\_\-vertices}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t mln::util::graph::v\_\-nmax\_\-nbh\_\-vertices (
\begin{DoxyParamCaption}
\item[{const {\bf vertex\_\-id\_\-t} \&}]{ id\_\-v}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_a972e02f0bb948895771ee571229cba5d}


Return the number of adjacent vertices of vertex {\ttfamily id\_\-v}. 



Definition at line 363 of file mln/util/graph.hh.



References has\_\-v(), and v\_\-nmax\_\-nbh\_\-edges().

\hypertarget{a00396_af40b891dc71b77906be6653806a14e38}{
\index{mln::util::graph@{mln::util::graph}!vertex@{vertex}}
\index{vertex@{vertex}!mln::util::graph@{mln::util::graph}}
\subsubsection[{vertex}]{\setlength{\rightskip}{0pt plus 5cm}graph::vertex\_\-t mln::util::graph::vertex (
\begin{DoxyParamCaption}
\item[{{\bf vertex\_\-id\_\-t}}]{ id\_\-v}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{d9/da1/a00396_af40b891dc71b77906be6653806a14e38}


Return the vertex whose id is {\itshape v\/}. 



Definition at line 322 of file mln/util/graph.hh.



References has\_\-v().

