\hypertarget{structOpenMesh_1_1SmartRangeT}{}\section{Open\+Mesh\+:\+:Smart\+RangeT$<$ RangeT, HandleT $>$ Struct Template Reference}
\label{structOpenMesh_1_1SmartRangeT}\index{Open\+Mesh\+::\+Smart\+Range\+T$<$ Range\+T, Handle\+T $>$@{Open\+Mesh\+::\+Smart\+Range\+T$<$ Range\+T, Handle\+T $>$}}


Base class for all smart range types.  




{\ttfamily \#include $<$Open\+Flipper/libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Core/\+Mesh/\+Smart\+Range.\+hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Functor $>$ }\\auto \hyperlink{structOpenMesh_1_1SmartRangeT_a13c21382cae3ce215ca156b6a455ab37}{sum} (Functor \&\&f) -\/$>$ typename std\+::decay$<$ decltype(f(std\+::declval$<$ HandleT $>$()))$>$\+::type
\begin{DoxyCompactList}\small\item\em Computes the sum of elements. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Functor $>$ }\\auto \hyperlink{structOpenMesh_1_1SmartRangeT_a2c2ba886e721dea119dcf97226e5430a}{avg} (Functor \&\&f) -\/$>$ typename std\+::decay$<$ decltype(f(std\+::declval$<$ HandleT $>$()))$>$\+::type
\begin{DoxyCompactList}\small\item\em Computes the average of elements. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Functor $>$ }\\auto \hyperlink{structOpenMesh_1_1SmartRangeT_a309f1e6f1f697950f43a1c767ebd84db}{any\+\_\+of} (Functor \&\&f) -\/$>$ bool
\begin{DoxyCompactList}\small\item\em Check if any element fulfils condition. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Functor $>$ }\\auto \hyperlink{structOpenMesh_1_1SmartRangeT_a4a9d3a656c33fcf584bcfccda4359cc4}{all\+\_\+of} (Functor \&\&f) -\/$>$ bool
\begin{DoxyCompactList}\small\item\em Check if all elements fulfil condition. \end{DoxyCompactList}\item 
{\footnotesize template$<$int n, typename Functor  = Identity$>$ }\\auto \hyperlink{structOpenMesh_1_1SmartRangeT_a16c4593922358a4b168ed8c05f15afc2}{to\+\_\+array} (Functor \&\&f=\{\}) -\/$>$ std\+::array$<$ typename std\+::decay$<$ decltype(f(std\+::declval$<$ HandleT $>$()))$>$\+::type, n $>$
\begin{DoxyCompactList}\small\item\em Convert range to array. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Functor  = Identity$>$ }\\auto \hyperlink{structOpenMesh_1_1SmartRangeT_a8f5379ce715caba78466cc8a2f2faa4f}{to\+\_\+vector} (Functor \&\&f=\{\}) -\/$>$ std\+::vector$<$ typename std\+::decay$<$ decltype(f(std\+::declval$<$ HandleT $>$()))$>$\+::type $>$
\begin{DoxyCompactList}\small\item\em Convert range to vector. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Functor  = Identity$>$ }\\auto \hyperlink{structOpenMesh_1_1SmartRangeT_a0eae509ef5701b4f8186a8ba54f8e71a}{to\+\_\+set} (Functor \&\&f=\{\}) -\/$>$ std\+::set$<$ typename std\+::decay$<$ decltype(f(std\+::declval$<$ HandleT $>$()))$>$\+::type $>$
\begin{DoxyCompactList}\small\item\em Convert range to set. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Functor $>$ }\\auto \hyperlink{structOpenMesh_1_1SmartRangeT_a388aab8e4c2f8940a360d52014c009e5}{first} (Functor \&\&f=\{\}) -\/$>$ HandleT
\begin{DoxyCompactList}\small\item\em Get the first element that fulfills a condition. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Functor $>$ }\\auto \hyperlink{structOpenMesh_1_1SmartRangeT_a2f050f7d137ab90950b5d668adcf57b9}{min} (Functor \&\&f) -\/$>$ typename std\+::decay$<$ decltype(f(std\+::declval$<$ HandleT $>$()))$>$\+::type
\begin{DoxyCompactList}\small\item\em Compute minimum. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Functor $>$ }\\auto \hyperlink{structOpenMesh_1_1SmartRangeT_ac7759756216e3c7390145b59a3b89f30}{max} (Functor \&\&f) -\/$>$ typename std\+::decay$<$ decltype(f(std\+::declval$<$ HandleT $>$()))$>$\+::type
\begin{DoxyCompactList}\small\item\em Compute maximum. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Functor $>$ }\\auto \hyperlink{structOpenMesh_1_1SmartRangeT_a2ff87b59192f68142138506a9bbb1a2c}{minmax} (Functor \&\&f) -\/$>$ std\+::pair$<$ typename std\+::decay$<$ decltype(f(std\+::declval$<$ HandleT $>$()))$>$\+::type, typename std\+::decay$<$ decltype(f(std\+::declval$<$ HandleT $>$()))$>$\+::type $>$
\begin{DoxyCompactList}\small\item\em Computes minimum and maximum. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename RangeT, typename HandleT$>$\newline
struct Open\+Mesh\+::\+Smart\+Range\+T$<$ Range\+T, Handle\+T $>$}

Base class for all smart range types. 

Definition at line 70 of file Smart\+Range.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{structOpenMesh_1_1SmartRangeT_a4a9d3a656c33fcf584bcfccda4359cc4}\label{structOpenMesh_1_1SmartRangeT_a4a9d3a656c33fcf584bcfccda4359cc4}} 
\index{Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}!all\+\_\+of@{all\+\_\+of}}
\index{all\+\_\+of@{all\+\_\+of}!Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}}
\subsubsection{\texorpdfstring{all\+\_\+of()}{all\_of()}}
{\footnotesize\ttfamily template$<$typename RangeT, typename HandleT$>$ \\
template$<$typename Functor $>$ \\
auto \hyperlink{structOpenMesh_1_1SmartRangeT}{Open\+Mesh\+::\+Smart\+RangeT}$<$ RangeT, HandleT $>$\+::all\+\_\+of (\begin{DoxyParamCaption}\item[{Functor \&\&}]{f }\end{DoxyParamCaption}) -\/$>$ bool
  \hspace{0.3cm}{\ttfamily [inline]}}



Check if all elements fulfil condition. 

Checks if functor {\ttfamily f} returns true for all of the elements in the range. Returns true if that is the case, false otherwise.


\begin{DoxyParams}{Parameters}
{\em f} & Functor that is evaluated for all elements. \\
\hline
\end{DoxyParams}


Definition at line 145 of file Smart\+Range.\+hh.

\mbox{\Hypertarget{structOpenMesh_1_1SmartRangeT_a309f1e6f1f697950f43a1c767ebd84db}\label{structOpenMesh_1_1SmartRangeT_a309f1e6f1f697950f43a1c767ebd84db}} 
\index{Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}!any\+\_\+of@{any\+\_\+of}}
\index{any\+\_\+of@{any\+\_\+of}!Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}}
\subsubsection{\texorpdfstring{any\+\_\+of()}{any\_of()}}
{\footnotesize\ttfamily template$<$typename RangeT, typename HandleT$>$ \\
template$<$typename Functor $>$ \\
auto \hyperlink{structOpenMesh_1_1SmartRangeT}{Open\+Mesh\+::\+Smart\+RangeT}$<$ RangeT, HandleT $>$\+::any\+\_\+of (\begin{DoxyParamCaption}\item[{Functor \&\&}]{f }\end{DoxyParamCaption}) -\/$>$ bool
  \hspace{0.3cm}{\ttfamily [inline]}}



Check if any element fulfils condition. 

Checks if functor {\ttfamily f} returns true for any of the elements in the range. Returns true if that is the case, false otherwise.


\begin{DoxyParams}{Parameters}
{\em f} & Functor that is evaluated for all elements. \\
\hline
\end{DoxyParams}


Definition at line 128 of file Smart\+Range.\+hh.

\mbox{\Hypertarget{structOpenMesh_1_1SmartRangeT_a2c2ba886e721dea119dcf97226e5430a}\label{structOpenMesh_1_1SmartRangeT_a2c2ba886e721dea119dcf97226e5430a}} 
\index{Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}!avg@{avg}}
\index{avg@{avg}!Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}}
\subsubsection{\texorpdfstring{avg()}{avg()}}
{\footnotesize\ttfamily template$<$typename RangeT, typename HandleT$>$ \\
template$<$typename Functor $>$ \\
auto \hyperlink{structOpenMesh_1_1SmartRangeT}{Open\+Mesh\+::\+Smart\+RangeT}$<$ RangeT, HandleT $>$\+::avg (\begin{DoxyParamCaption}\item[{Functor \&\&}]{f }\end{DoxyParamCaption}) -\/$>$ typename std\+::decay$<$decltype (f(std\+::declval$<$HandleT$>$()))$>$\+::type
  \hspace{0.3cm}{\ttfamily [inline]}}



Computes the average of elements. 

Computes the average of all elements in the range after applying the functor {\ttfamily f}.


\begin{DoxyParams}{Parameters}
{\em f} & Functor that is applied to all elements before computing the average. \\
\hline
\end{DoxyParams}


Definition at line 102 of file Smart\+Range.\+hh.

\mbox{\Hypertarget{structOpenMesh_1_1SmartRangeT_a388aab8e4c2f8940a360d52014c009e5}\label{structOpenMesh_1_1SmartRangeT_a388aab8e4c2f8940a360d52014c009e5}} 
\index{Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}!first@{first}}
\index{first@{first}!Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}}
\subsubsection{\texorpdfstring{first()}{first()}}
{\footnotesize\ttfamily template$<$typename RangeT, typename HandleT$>$ \\
template$<$typename Functor $>$ \\
auto \hyperlink{structOpenMesh_1_1SmartRangeT}{Open\+Mesh\+::\+Smart\+RangeT}$<$ RangeT, HandleT $>$\+::first (\begin{DoxyParamCaption}\item[{Functor \&\&}]{f = {\ttfamily \{\}} }\end{DoxyParamCaption}) -\/$>$ HandleT
  \hspace{0.3cm}{\ttfamily [inline]}}



Get the first element that fulfills a condition. 

Finds the first element of the range for which the functor {\ttfamily f} evaluates to true. Returns an invalid handle if none evaluates to true


\begin{DoxyParams}{Parameters}
{\em f} & Functor that is applied to all elements before putting them into the set. If no functor is provided the set will contain the handles. \\
\hline
\end{DoxyParams}


Definition at line 219 of file Smart\+Range.\+hh.

\mbox{\Hypertarget{structOpenMesh_1_1SmartRangeT_ac7759756216e3c7390145b59a3b89f30}\label{structOpenMesh_1_1SmartRangeT_ac7759756216e3c7390145b59a3b89f30}} 
\index{Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}!max@{max}}
\index{max@{max}!Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}}
\subsubsection{\texorpdfstring{max()}{max()}}
{\footnotesize\ttfamily template$<$typename RangeT, typename HandleT$>$ \\
template$<$typename Functor $>$ \\
auto \hyperlink{structOpenMesh_1_1SmartRangeT}{Open\+Mesh\+::\+Smart\+RangeT}$<$ RangeT, HandleT $>$\+::max (\begin{DoxyParamCaption}\item[{Functor \&\&}]{f }\end{DoxyParamCaption}) -\/$>$ typename std\+::decay$<$decltype (f(std\+::declval$<$HandleT$>$()))$>$\+::type
  \hspace{0.3cm}{\ttfamily [inline]}}



Compute maximum. 

Computes the maximum of all objects returned by functor {\ttfamily f}.


\begin{DoxyParams}{Parameters}
{\em f} & Functor that is applied to all elements before computing maximum. \\
\hline
\end{DoxyParams}


Definition at line 260 of file Smart\+Range.\+hh.

\mbox{\Hypertarget{structOpenMesh_1_1SmartRangeT_a2f050f7d137ab90950b5d668adcf57b9}\label{structOpenMesh_1_1SmartRangeT_a2f050f7d137ab90950b5d668adcf57b9}} 
\index{Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}!min@{min}}
\index{min@{min}!Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}}
\subsubsection{\texorpdfstring{min()}{min()}}
{\footnotesize\ttfamily template$<$typename RangeT, typename HandleT$>$ \\
template$<$typename Functor $>$ \\
auto \hyperlink{structOpenMesh_1_1SmartRangeT}{Open\+Mesh\+::\+Smart\+RangeT}$<$ RangeT, HandleT $>$\+::min (\begin{DoxyParamCaption}\item[{Functor \&\&}]{f }\end{DoxyParamCaption}) -\/$>$ typename std\+::decay$<$decltype (f(std\+::declval$<$HandleT$>$()))$>$\+::type
  \hspace{0.3cm}{\ttfamily [inline]}}



Compute minimum. 

Computes the minimum of all objects returned by functor {\ttfamily f}.


\begin{DoxyParams}{Parameters}
{\em f} & Functor that is applied to all elements before computing minimum. \\
\hline
\end{DoxyParams}


Definition at line 235 of file Smart\+Range.\+hh.

\mbox{\Hypertarget{structOpenMesh_1_1SmartRangeT_a2ff87b59192f68142138506a9bbb1a2c}\label{structOpenMesh_1_1SmartRangeT_a2ff87b59192f68142138506a9bbb1a2c}} 
\index{Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}!minmax@{minmax}}
\index{minmax@{minmax}!Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}}
\subsubsection{\texorpdfstring{minmax()}{minmax()}}
{\footnotesize\ttfamily template$<$typename RangeT, typename HandleT$>$ \\
template$<$typename Functor $>$ \\
auto \hyperlink{structOpenMesh_1_1SmartRangeT}{Open\+Mesh\+::\+Smart\+RangeT}$<$ RangeT, HandleT $>$\+::minmax (\begin{DoxyParamCaption}\item[{Functor \&\&}]{f }\end{DoxyParamCaption}) -\/$>$ std\+::pair$<$typename std\+::decay$<$decltype (f(std\+::declval$<$HandleT$>$()))$>$\+::type,
                                        typename std\+::decay$<$decltype (f(std\+::declval$<$HandleT$>$()))$>$\+::type$>$
  \hspace{0.3cm}{\ttfamily [inline]}}



Computes minimum and maximum. 

Computes the minimum and maximum of all objects returned by functor {\ttfamily f}. Result is returned as std\+::pair containing minimum as first and maximum as second element.


\begin{DoxyParams}{Parameters}
{\em f} & Functor that is applied to all elements before computing maximum. \\
\hline
\end{DoxyParams}


Definition at line 286 of file Smart\+Range.\+hh.

\mbox{\Hypertarget{structOpenMesh_1_1SmartRangeT_a13c21382cae3ce215ca156b6a455ab37}\label{structOpenMesh_1_1SmartRangeT_a13c21382cae3ce215ca156b6a455ab37}} 
\index{Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}!sum@{sum}}
\index{sum@{sum}!Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}}
\subsubsection{\texorpdfstring{sum()}{sum()}}
{\footnotesize\ttfamily template$<$typename RangeT, typename HandleT$>$ \\
template$<$typename Functor $>$ \\
auto \hyperlink{structOpenMesh_1_1SmartRangeT}{Open\+Mesh\+::\+Smart\+RangeT}$<$ RangeT, HandleT $>$\+::sum (\begin{DoxyParamCaption}\item[{Functor \&\&}]{f }\end{DoxyParamCaption}) -\/$>$ typename std\+::decay$<$decltype (f(std\+::declval$<$HandleT$>$()))$>$\+::type
  \hspace{0.3cm}{\ttfamily [inline]}}



Computes the sum of elements. 

Computes the sum of all elements in the range after applying the functor {\ttfamily f}.


\begin{DoxyParams}{Parameters}
{\em f} & Functor that is applied to all elements before computing the sum \\
\hline
\end{DoxyParams}


Definition at line 81 of file Smart\+Range.\+hh.

\mbox{\Hypertarget{structOpenMesh_1_1SmartRangeT_a16c4593922358a4b168ed8c05f15afc2}\label{structOpenMesh_1_1SmartRangeT_a16c4593922358a4b168ed8c05f15afc2}} 
\index{Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}!to\+\_\+array@{to\+\_\+array}}
\index{to\+\_\+array@{to\+\_\+array}!Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}}
\subsubsection{\texorpdfstring{to\+\_\+array()}{to\_array()}}
{\footnotesize\ttfamily template$<$typename RangeT, typename HandleT$>$ \\
template$<$int n, typename Functor  = Identity$>$ \\
auto \hyperlink{structOpenMesh_1_1SmartRangeT}{Open\+Mesh\+::\+Smart\+RangeT}$<$ RangeT, HandleT $>$\+::to\+\_\+array (\begin{DoxyParamCaption}\item[{Functor \&\&}]{f = {\ttfamily \{\}} }\end{DoxyParamCaption}) -\/$>$ std\+::array$<$typename std\+::decay$<$decltype (f(std\+::declval$<$HandleT$>$()))$>$\+::type, n$>$
  \hspace{0.3cm}{\ttfamily [inline]}}



Convert range to array. 

Converts the range of elements into an array of objects returned by functor {\ttfamily f}. The size of the array needs to be provided by the user. If the size is larger than the number of elements in the range, the remaining entries of the array will be uninitialized.


\begin{DoxyParams}{Parameters}
{\em f} & Functor that is applied to all elements before putting them into the array. If no functor is provided the array will contain the handles. \\
\hline
\end{DoxyParams}


Definition at line 164 of file Smart\+Range.\+hh.

\mbox{\Hypertarget{structOpenMesh_1_1SmartRangeT_a0eae509ef5701b4f8186a8ba54f8e71a}\label{structOpenMesh_1_1SmartRangeT_a0eae509ef5701b4f8186a8ba54f8e71a}} 
\index{Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}!to\+\_\+set@{to\+\_\+set}}
\index{to\+\_\+set@{to\+\_\+set}!Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}}
\subsubsection{\texorpdfstring{to\+\_\+set()}{to\_set()}}
{\footnotesize\ttfamily template$<$typename RangeT, typename HandleT$>$ \\
template$<$typename Functor  = Identity$>$ \\
auto \hyperlink{structOpenMesh_1_1SmartRangeT}{Open\+Mesh\+::\+Smart\+RangeT}$<$ RangeT, HandleT $>$\+::to\+\_\+set (\begin{DoxyParamCaption}\item[{Functor \&\&}]{f = {\ttfamily \{\}} }\end{DoxyParamCaption}) -\/$>$ std\+::set$<$typename std\+::decay$<$decltype (f(std\+::declval$<$HandleT$>$()))$>$\+::type$>$
  \hspace{0.3cm}{\ttfamily [inline]}}



Convert range to set. 

Converts the range of elements into a set of objects returned by functor {\ttfamily f}.


\begin{DoxyParams}{Parameters}
{\em f} & Functor that is applied to all elements before putting them into the set. If no functor is provided the set will contain the handles. \\
\hline
\end{DoxyParams}


Definition at line 201 of file Smart\+Range.\+hh.

\mbox{\Hypertarget{structOpenMesh_1_1SmartRangeT_a8f5379ce715caba78466cc8a2f2faa4f}\label{structOpenMesh_1_1SmartRangeT_a8f5379ce715caba78466cc8a2f2faa4f}} 
\index{Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}!to\+\_\+vector@{to\+\_\+vector}}
\index{to\+\_\+vector@{to\+\_\+vector}!Open\+Mesh\+::\+Smart\+RangeT@{Open\+Mesh\+::\+Smart\+RangeT}}
\subsubsection{\texorpdfstring{to\+\_\+vector()}{to\_vector()}}
{\footnotesize\ttfamily template$<$typename RangeT, typename HandleT$>$ \\
template$<$typename Functor  = Identity$>$ \\
auto \hyperlink{structOpenMesh_1_1SmartRangeT}{Open\+Mesh\+::\+Smart\+RangeT}$<$ RangeT, HandleT $>$\+::to\+\_\+vector (\begin{DoxyParamCaption}\item[{Functor \&\&}]{f = {\ttfamily \{\}} }\end{DoxyParamCaption}) -\/$>$ std\+::vector$<$typename std\+::decay$<$decltype (f(std\+::declval$<$HandleT$>$()))$>$\+::type$>$
  \hspace{0.3cm}{\ttfamily [inline]}}



Convert range to vector. 

Converts the range of elements into a vector of objects returned by functor {\ttfamily f}.


\begin{DoxyParams}{Parameters}
{\em f} & Functor that is applied to all elements before putting them into the vector. If no functor is provided the vector will contain the handles. \\
\hline
\end{DoxyParams}


Definition at line 184 of file Smart\+Range.\+hh.



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Core/\+Mesh/Smart\+Range.\+hh\end{DoxyCompactItemize}
