OpenMesh
OpenMesh::FilteredSmartRangeT< RangeT, HandleT, Functor > Struct Template Reference

Class which applies a filter when iterating over elements. More...

#include <OpenMesh/Core/Mesh/SmartRange.hh>

Inheritance diagram for OpenMesh::FilteredSmartRangeT< RangeT, HandleT, Functor >:
Collaboration diagram for OpenMesh::FilteredSmartRangeT< RangeT, HandleT, Functor >:

Classes

struct  FilteredIterator
 

Public Types

using BaseRange = SmartRangeT< FilteredSmartRangeT< RangeT, HandleT, Functor >, HandleT >
 
using BaseIterator = decltype((std::declval< typename RangeT::Range >().begin()))
 
- Public Types inherited from OpenMesh::SmartRangeT< FilteredSmartRangeT< RangeT, HandleT, Functor >, HandleT >
using Handle = HandleT
 
using SmartRange = SmartRangeT< FilteredSmartRangeT< RangeT, HandleT, Functor >, HandleT >
 
using Range = FilteredSmartRangeT< RangeT, HandleT, Functor >
 

Public Member Functions

 FilteredSmartRangeT (Functor f, BaseIterator begin, BaseIterator end)
 
FilteredIterator begin () const
 
FilteredIterator end () const
 
- Public Member Functions inherited from OpenMesh::SmartRangeT< FilteredSmartRangeT< RangeT, HandleT, Functor >, HandleT >
auto sum (Functor &&f) -> typename std::decay< decltype(f(std::declval< HandleT >()))>::type
 Computes the sum of elements. More...
 
auto avg (Functor &&f) -> typename std::decay< decltype(f(std::declval< HandleT >()))>::type
 Computes the average of elements. More...
 
auto any_of (Functor &&f) -> bool
 Check if any element fulfils condition. More...
 
auto all_of (Functor &&f) -> bool
 Check if all elements fulfil condition. More...
 
auto to_array (Functor &&f={}) -> std::array< typename std::decay< decltype(f(std::declval< HandleT >()))>::type, n >
 Convert range to array. More...
 
auto to_vector (Functor &&f={}) -> std::vector< typename std::decay< decltype(f(std::declval< HandleT >()))>::type >
 Convert range to vector. More...
 
auto to_set (Functor &&f={}) -> std::set< typename std::decay< decltype(f(std::declval< HandleT >()))>::type >
 Convert range to set. More...
 
auto first (Functor &&f={}) -> HandleT
 Get the first element that fulfills a condition. More...
 
auto min (Functor &&f) -> typename std::decay< decltype(f(std::declval< HandleT >()))>::type
 Compute minimum. More...
 
auto argmin (Functor &&f) -> HandleT
 Compute minimal element. More...
 
auto max (Functor &&f) -> typename std::decay< decltype(f(std::declval< HandleT >()))>::type
 Compute maximum. More...
 
auto argmax (Functor &&f) -> HandleT
 Compute maximal element. More...
 
auto minmax (Functor &&f) -> std::pair< typename std::decay< decltype(f(std::declval< HandleT >()))>::type, typename std::decay< decltype(f(std::declval< HandleT >()))>::type >
 Computes minimum and maximum. More...
 
auto count_if (Functor &&f) -> int
 Compute number of elements that satisfy a given predicate. More...
 
auto for_each (Functor &&f) -> void
 Apply a functor to each element. More...
 
auto filtered (Functor &&f) -> FilteredSmartRangeT< SmartRange, Handle, typename std::decay< Functor >::type >
 Only iterate over a subset of elements. More...
 

Public Attributes

Functor f_
 
BaseIterator begin_
 
BaseIterator end_
 

Detailed Description

template<typename RangeT, typename HandleT, typename Functor>
struct OpenMesh::FilteredSmartRangeT< RangeT, HandleT, Functor >

Class which applies a filter when iterating over elements.


The documentation for this struct was generated from the following file:

Project OpenMesh, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .