| 1 |
\hypertarget{classneighborIterator}{}\section{neighbor\+Iterator$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$ Class Template Reference} |
| 2 |
\label{classneighborIterator}\index{neighbor\+Iterator$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$@{neighbor\+Iterator$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$}} |
| 3 |
|
| 4 |
|
| 5 |
Iterator for the neighbors (predecessors or successors) of a reference unitig used in a \hyperlink{classUnitigMap}{Unitig\+Map} object. |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
Inherits iterator$<$ std\+::input\+\_\+iterator\+\_\+tag, Unitig\+Map$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$, int $>$. |
| 11 |
|
| 12 |
\subsection*{Public Member Functions} |
| 13 |
\begin{DoxyCompactItemize} |
| 14 |
\item |
| 15 |
\hyperlink{classneighborIterator_ab857cd8f2e6bb98f844d9316c8e8d5b5}{neighbor\+Iterator} () |
| 16 |
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item |
| 17 |
\hyperlink{classneighborIterator_a3a524d5ee6219ea7ccc3a11f69d80835}{neighbor\+Iterator} (const \hyperlink{classUnitigMap}{Unitig\+Map}$<$ U, G, is\+\_\+const $>$ \&um\+\_\+, const bool is\+\_\+forward\+\_\+) |
| 18 |
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item |
| 19 |
\hyperlink{classneighborIterator_ad7ee6efe87e4c4619c96e6c4fae809df}{neighbor\+Iterator} (const \hyperlink{classneighborIterator}{neighbor\+Iterator} \&o) |
| 20 |
\begin{DoxyCompactList}\small\item\em Copy constructor. \end{DoxyCompactList}\item |
| 21 |
\hyperlink{classneighborIterator}{neighbor\+Iterator} \& \hyperlink{classneighborIterator_aa84a0c4942e9a9ba2245eb2572205c66}{operator++} () |
| 22 |
\begin{DoxyCompactList}\small\item\em Prefix increment, iterate over the next neighbor (predecessor or successor). \end{DoxyCompactList}\item |
| 23 |
\hyperlink{classneighborIterator}{neighbor\+Iterator} \hyperlink{classneighborIterator_a508d1dccf8281fed8abd8aaefb145570}{operator++} (int) |
| 24 |
\begin{DoxyCompactList}\small\item\em Postfix increment, iterate over the next neighbor (predecessor or successor). \end{DoxyCompactList}\item |
| 25 |
bool \hyperlink{classneighborIterator_a039b30193aefde354eba133a55263b51}{operator==} (const \hyperlink{classneighborIterator}{neighbor\+Iterator} \&o) const |
| 26 |
\begin{DoxyCompactList}\small\item\em Equality operator\+: check if two \hyperlink{classneighborIterator}{neighbor\+Iterator} are the same. \end{DoxyCompactList}\item |
| 27 |
bool \hyperlink{classneighborIterator_a95d8840e2114007102d64d9013a7169e}{operator!=} (const \hyperlink{classneighborIterator}{neighbor\+Iterator} \&o) const |
| 28 |
\begin{DoxyCompactList}\small\item\em Inequality operator\+: check if two \hyperlink{classneighborIterator}{neighbor\+Iterator} are different. \end{DoxyCompactList}\item |
| 29 |
const \hyperlink{classUnitigMap}{Unitig\+Map}$<$ U, G, is\+\_\+const $>$ \& \hyperlink{classneighborIterator_a4481d0b5d4b31cc0e3f9064f8906f70b}{operator$\ast$} () const |
| 30 |
\begin{DoxyCompactList}\small\item\em Indirection operator. \end{DoxyCompactList}\item |
| 31 |
const \hyperlink{classUnitigMap}{Unitig\+Map}$<$ U, G, is\+\_\+const $>$ $\ast$ \hyperlink{classneighborIterator_a9626c1843dc3134a53756c7c0c3309da}{operator-\/$>$} () const |
| 32 |
\begin{DoxyCompactList}\small\item\em Dereference operator. \end{DoxyCompactList}\end{DoxyCompactItemize} |
| 33 |
|
| 34 |
|
| 35 |
\subsection{Detailed Description} |
| 36 |
\subsubsection*{template$<$typename Unitig\+\_\+data\+\_\+t = void, typename Graph\+\_\+data\+\_\+t = void, bool is\+\_\+const = false$>$\newline |
| 37 |
class neighbor\+Iterator$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$} |
| 38 |
|
| 39 |
Iterator for the neighbors (predecessors or successors) of a reference unitig used in a \hyperlink{classUnitigMap}{Unitig\+Map} object. |
| 40 |
|
| 41 |
A \hyperlink{classneighborIterator}{neighbor\+Iterator} object has 3 template parameters\+: the type of data associated with the unitigs of the graph, the type of data associated with the graph and a boolean indicating if this is a constant iterator or not. Note that you are supposed to use this class as the iterator of a \hyperlink{classBackwardCDBG}{Backward\+C\+D\+BG} or \hyperlink{classForwardCDBG}{Forward\+C\+D\+BG} object, which can be obtained respectively from \hyperlink{classUnitigMap_adfae0ba9c3675fd5612a4b71b46a25c6}{Unitig\+Map\+::get\+Predecessors()} and \hyperlink{classUnitigMap_a5b2894e0f78e6b003d06a03a49904b59}{Unitig\+Map\+::get\+Successors()}, so you shouldn\textquotesingle{}t have to instantiate an object \hyperlink{classneighborIterator}{neighbor\+Iterator} and its template parameters yourself. The unitig data and graph data types should be the same as the ones used for the \hyperlink{classCompactedDBG}{Compacted\+D\+BG} the iterator is from. No specific order (such as a lexicographic one) is assumed during iteration. |
| 42 |
\begin{DoxyCode} |
| 43 |
\hyperlink{classCompactedDBG}{CompactedDBG<>} cdbg; |
| 44 |
... \textcolor{comment}{// Some more code, cdbg construction} |
| 45 |
\textcolor{keywordflow}{for} (\textcolor{keyword}{const} \textcolor{keyword}{auto}& unitig : cdbg)\{ |
| 46 |
cout << unitig.toString() << endl; \textcolor{comment}{// unitig is of type UnitigMap} |
| 47 |
\textcolor{keywordflow}{for} (\textcolor{keyword}{const} \textcolor{keyword}{auto}& pred : unitig.getPredecessors()) cout << pred.toString() << endl; |
| 48 |
\textcolor{keywordflow}{for} (\textcolor{keyword}{const} \textcolor{keyword}{auto}& succ : unitig.getSuccessors()) cout << succ.toString() << endl; |
| 49 |
\} |
| 50 |
\end{DoxyCode} |
| 51 |
|
| 52 |
|
| 53 |
\subsection{Constructor \& Destructor Documentation} |
| 54 |
\mbox{\Hypertarget{classneighborIterator_ab857cd8f2e6bb98f844d9316c8e8d5b5}\label{classneighborIterator_ab857cd8f2e6bb98f844d9316c8e8d5b5}} |
| 55 |
\index{neighbor\+Iterator@{neighbor\+Iterator}!neighbor\+Iterator@{neighbor\+Iterator}} |
| 56 |
\index{neighbor\+Iterator@{neighbor\+Iterator}!neighbor\+Iterator@{neighbor\+Iterator}} |
| 57 |
\subsubsection{\texorpdfstring{neighbor\+Iterator()}{neighborIterator()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}} |
| 58 |
{\footnotesize\ttfamily template$<$typename Unitig\+\_\+data\+\_\+t = void, typename Graph\+\_\+data\+\_\+t = void, bool is\+\_\+const = false$>$ \\ |
| 59 |
\hyperlink{classneighborIterator}{neighbor\+Iterator}$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$\+::\hyperlink{classneighborIterator}{neighbor\+Iterator} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
Constructor. |
| 64 |
|
| 65 |
\begin{DoxyReturn}{Returns} |
| 66 |
an empty \hyperlink{classneighborIterator}{neighbor\+Iterator}. |
| 67 |
\end{DoxyReturn} |
| 68 |
\mbox{\Hypertarget{classneighborIterator_a3a524d5ee6219ea7ccc3a11f69d80835}\label{classneighborIterator_a3a524d5ee6219ea7ccc3a11f69d80835}} |
| 69 |
\index{neighbor\+Iterator@{neighbor\+Iterator}!neighbor\+Iterator@{neighbor\+Iterator}} |
| 70 |
\index{neighbor\+Iterator@{neighbor\+Iterator}!neighbor\+Iterator@{neighbor\+Iterator}} |
| 71 |
\subsubsection{\texorpdfstring{neighbor\+Iterator()}{neighborIterator()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}} |
| 72 |
{\footnotesize\ttfamily template$<$typename Unitig\+\_\+data\+\_\+t = void, typename Graph\+\_\+data\+\_\+t = void, bool is\+\_\+const = false$>$ \\ |
| 73 |
\hyperlink{classneighborIterator}{neighbor\+Iterator}$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$\+::\hyperlink{classneighborIterator}{neighbor\+Iterator} (\begin{DoxyParamCaption}\item[{const \hyperlink{classUnitigMap}{Unitig\+Map}$<$ U, G, is\+\_\+const $>$ \&}]{um\+\_\+, }\item[{const bool}]{is\+\_\+forward\+\_\+ }\end{DoxyParamCaption})} |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
Constructor. |
| 78 |
|
| 79 |
|
| 80 |
\begin{DoxyParams}{Parameters} |
| 81 |
{\em um\+\_\+} & is a \hyperlink{classUnitigMap}{Unitig\+Map} object\+: the constructed \hyperlink{classneighborIterator}{neighbor\+Iterator} will iterate over the neighbors of the \hyperlink{classUnitigMap}{Unitig\+Map} reference unitig \\ |
| 82 |
\hline |
| 83 |
{\em is\+\_\+forward\+\_\+} & indicates if the iterator must iterate over the successors (true) or the predecessors (false) \\ |
| 84 |
\hline |
| 85 |
\end{DoxyParams} |
| 86 |
\begin{DoxyReturn}{Returns} |
| 87 |
a \hyperlink{classneighborIterator}{neighbor\+Iterator}. |
| 88 |
\end{DoxyReturn} |
| 89 |
\mbox{\Hypertarget{classneighborIterator_ad7ee6efe87e4c4619c96e6c4fae809df}\label{classneighborIterator_ad7ee6efe87e4c4619c96e6c4fae809df}} |
| 90 |
\index{neighbor\+Iterator@{neighbor\+Iterator}!neighbor\+Iterator@{neighbor\+Iterator}} |
| 91 |
\index{neighbor\+Iterator@{neighbor\+Iterator}!neighbor\+Iterator@{neighbor\+Iterator}} |
| 92 |
\subsubsection{\texorpdfstring{neighbor\+Iterator()}{neighborIterator()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}} |
| 93 |
{\footnotesize\ttfamily template$<$typename Unitig\+\_\+data\+\_\+t = void, typename Graph\+\_\+data\+\_\+t = void, bool is\+\_\+const = false$>$ \\ |
| 94 |
\hyperlink{classneighborIterator}{neighbor\+Iterator}$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$\+::\hyperlink{classneighborIterator}{neighbor\+Iterator} (\begin{DoxyParamCaption}\item[{const \hyperlink{classneighborIterator}{neighbor\+Iterator}$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$ \&}]{o }\end{DoxyParamCaption})} |
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
Copy constructor. |
| 99 |
|
| 100 |
\begin{DoxyReturn}{Returns} |
| 101 |
a copy of a \hyperlink{classneighborIterator}{neighbor\+Iterator}. |
| 102 |
\end{DoxyReturn} |
| 103 |
|
| 104 |
|
| 105 |
\subsection{Member Function Documentation} |
| 106 |
\mbox{\Hypertarget{classneighborIterator_a95d8840e2114007102d64d9013a7169e}\label{classneighborIterator_a95d8840e2114007102d64d9013a7169e}} |
| 107 |
\index{neighbor\+Iterator@{neighbor\+Iterator}!operator"!=@{operator"!=}} |
| 108 |
\index{operator"!=@{operator"!=}!neighbor\+Iterator@{neighbor\+Iterator}} |
| 109 |
\subsubsection{\texorpdfstring{operator"!=()}{operator!=()}} |
| 110 |
{\footnotesize\ttfamily template$<$typename Unitig\+\_\+data\+\_\+t = void, typename Graph\+\_\+data\+\_\+t = void, bool is\+\_\+const = false$>$ \\ |
| 111 |
bool \hyperlink{classneighborIterator}{neighbor\+Iterator}$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$\+::operator!= (\begin{DoxyParamCaption}\item[{const \hyperlink{classneighborIterator}{neighbor\+Iterator}$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$ \&}]{o }\end{DoxyParamCaption}) const} |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
Inequality operator\+: check if two \hyperlink{classneighborIterator}{neighbor\+Iterator} are different. |
| 116 |
|
| 117 |
|
| 118 |
\begin{DoxyParams}{Parameters} |
| 119 |
{\em o} & is another \hyperlink{classneighborIterator}{neighbor\+Iterator}. \\ |
| 120 |
\hline |
| 121 |
\end{DoxyParams} |
| 122 |
\begin{DoxyReturn}{Returns} |
| 123 |
a boolean indicating whether the two \hyperlink{classneighborIterator}{neighbor\+Iterator} are different. |
| 124 |
\end{DoxyReturn} |
| 125 |
\mbox{\Hypertarget{classneighborIterator_a4481d0b5d4b31cc0e3f9064f8906f70b}\label{classneighborIterator_a4481d0b5d4b31cc0e3f9064f8906f70b}} |
| 126 |
\index{neighbor\+Iterator@{neighbor\+Iterator}!operator$\ast$@{operator$\ast$}} |
| 127 |
\index{operator$\ast$@{operator$\ast$}!neighbor\+Iterator@{neighbor\+Iterator}} |
| 128 |
\subsubsection{\texorpdfstring{operator$\ast$()}{operator*()}} |
| 129 |
{\footnotesize\ttfamily template$<$typename Unitig\+\_\+data\+\_\+t = void, typename Graph\+\_\+data\+\_\+t = void, bool is\+\_\+const = false$>$ \\ |
| 130 |
const \hyperlink{classUnitigMap}{Unitig\+Map}$<$U, G, is\+\_\+const$>$\& \hyperlink{classneighborIterator}{neighbor\+Iterator}$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$\+::operator$\ast$ (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const} |
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
Indirection operator. |
| 135 |
|
| 136 |
\begin{DoxyReturn}{Returns} |
| 137 |
a \hyperlink{classUnitigMap}{Unitig\+Map} reference which contains information about the mapped neighbor. |
| 138 |
\end{DoxyReturn} |
| 139 |
\mbox{\Hypertarget{classneighborIterator_aa84a0c4942e9a9ba2245eb2572205c66}\label{classneighborIterator_aa84a0c4942e9a9ba2245eb2572205c66}} |
| 140 |
\index{neighbor\+Iterator@{neighbor\+Iterator}!operator++@{operator++}} |
| 141 |
\index{operator++@{operator++}!neighbor\+Iterator@{neighbor\+Iterator}} |
| 142 |
\subsubsection{\texorpdfstring{operator++()}{operator++()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} |
| 143 |
{\footnotesize\ttfamily template$<$typename Unitig\+\_\+data\+\_\+t = void, typename Graph\+\_\+data\+\_\+t = void, bool is\+\_\+const = false$>$ \\ |
| 144 |
\hyperlink{classneighborIterator}{neighbor\+Iterator}\& \hyperlink{classneighborIterator}{neighbor\+Iterator}$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$\+::operator++ (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} |
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
Prefix increment, iterate over the next neighbor (predecessor or successor). |
| 149 |
|
| 150 |
Note that no specific order (such as a lexicographic one) is assumed during iteration. \mbox{\Hypertarget{classneighborIterator_a508d1dccf8281fed8abd8aaefb145570}\label{classneighborIterator_a508d1dccf8281fed8abd8aaefb145570}} |
| 151 |
\index{neighbor\+Iterator@{neighbor\+Iterator}!operator++@{operator++}} |
| 152 |
\index{operator++@{operator++}!neighbor\+Iterator@{neighbor\+Iterator}} |
| 153 |
\subsubsection{\texorpdfstring{operator++()}{operator++()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} |
| 154 |
{\footnotesize\ttfamily template$<$typename Unitig\+\_\+data\+\_\+t = void, typename Graph\+\_\+data\+\_\+t = void, bool is\+\_\+const = false$>$ \\ |
| 155 |
\hyperlink{classneighborIterator}{neighbor\+Iterator} \hyperlink{classneighborIterator}{neighbor\+Iterator}$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$\+::operator++ (\begin{DoxyParamCaption}\item[{int}]{ }\end{DoxyParamCaption})} |
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
Postfix increment, iterate over the next neighbor (predecessor or successor). |
| 160 |
|
| 161 |
Note that no specific order (such as a lexicographic one) is assumed during iteration. \mbox{\Hypertarget{classneighborIterator_a9626c1843dc3134a53756c7c0c3309da}\label{classneighborIterator_a9626c1843dc3134a53756c7c0c3309da}} |
| 162 |
\index{neighbor\+Iterator@{neighbor\+Iterator}!operator-\/$>$@{operator-\/$>$}} |
| 163 |
\index{operator-\/$>$@{operator-\/$>$}!neighbor\+Iterator@{neighbor\+Iterator}} |
| 164 |
\subsubsection{\texorpdfstring{operator-\/$>$()}{operator->()}} |
| 165 |
{\footnotesize\ttfamily template$<$typename Unitig\+\_\+data\+\_\+t = void, typename Graph\+\_\+data\+\_\+t = void, bool is\+\_\+const = false$>$ \\ |
| 166 |
const \hyperlink{classUnitigMap}{Unitig\+Map}$<$U, G, is\+\_\+const$>$$\ast$ \hyperlink{classneighborIterator}{neighbor\+Iterator}$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$\+::operator-\/$>$ (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const} |
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
Dereference operator. |
| 171 |
|
| 172 |
\begin{DoxyReturn}{Returns} |
| 173 |
a \hyperlink{classUnitigMap}{Unitig\+Map} pointer which contains information about the mapped neighbor. |
| 174 |
\end{DoxyReturn} |
| 175 |
\mbox{\Hypertarget{classneighborIterator_a039b30193aefde354eba133a55263b51}\label{classneighborIterator_a039b30193aefde354eba133a55263b51}} |
| 176 |
\index{neighbor\+Iterator@{neighbor\+Iterator}!operator==@{operator==}} |
| 177 |
\index{operator==@{operator==}!neighbor\+Iterator@{neighbor\+Iterator}} |
| 178 |
\subsubsection{\texorpdfstring{operator==()}{operator==()}} |
| 179 |
{\footnotesize\ttfamily template$<$typename Unitig\+\_\+data\+\_\+t = void, typename Graph\+\_\+data\+\_\+t = void, bool is\+\_\+const = false$>$ \\ |
| 180 |
bool \hyperlink{classneighborIterator}{neighbor\+Iterator}$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$\+::operator== (\begin{DoxyParamCaption}\item[{const \hyperlink{classneighborIterator}{neighbor\+Iterator}$<$ Unitig\+\_\+data\+\_\+t, Graph\+\_\+data\+\_\+t, is\+\_\+const $>$ \&}]{o }\end{DoxyParamCaption}) const} |
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
Equality operator\+: check if two \hyperlink{classneighborIterator}{neighbor\+Iterator} are the same. |
| 185 |
|
| 186 |
|
| 187 |
\begin{DoxyParams}{Parameters} |
| 188 |
{\em o} & is another \hyperlink{classneighborIterator}{neighbor\+Iterator}. \\ |
| 189 |
\hline |
| 190 |
\end{DoxyParams} |
| 191 |
\begin{DoxyReturn}{Returns} |
| 192 |
a boolean indicating whether the two \hyperlink{classneighborIterator}{neighbor\+Iterator} are the same. |
| 193 |
\end{DoxyReturn} |
| 194 |
|
| 195 |
|
| 196 |
The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} |
| 197 |
\item |
| 198 |
src/\hyperlink{NeighborIterator_8hpp}{Neighbor\+Iterator.\+hpp}\end{DoxyCompactItemize} |