Loading...
Searching...
No Matches
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 >:
[legend]
Collaboration diagram for OpenMesh::FilteredSmartRangeT< RangeT, HandleT, Functor >:
[legend]

## 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.
auto | avg (Functor &&f) -> typename std::decay< decltype(f(std::declval< HandleT >()))>::type
| Computes the average of elements.
auto | avg (Functor &&f, WeightFunctor &&w) -> typename std::decay< decltype((1.0/(w(std::declval< HandleT >())+w(std::declval< HandleT >()))) *f(std::declval< HandleT >()))>::type
| Computes the weighted average of elements.
auto | any_of (Functor &&f) -> bool
| Check if any element fulfils condition.
auto | all_of (Functor &&f) -> bool
| Check if all elements fulfil condition.
auto | to_array (Functor &&f={}) -> std::array< typename std::decay< decltype(f(std::declval< HandleT >()))>::type, n >
| Convert range to array.
auto | to_vector (Functor &&f={}) -> std::vector< typename std::decay< decltype(f(std::declval< HandleT >()))>::type >
| Convert range to vector.
auto | to_set (Functor &&f={}) -> std::set< typename std::decay< decltype(f(std::declval< HandleT >()))>::type >
| Convert range to set.
auto | first (Functor &&f={}) -> HandleT
| Get the first element that fulfills a condition.
auto | min (Functor &&f) -> typename std::decay< decltype(f(std::declval< HandleT >()))>::type
| Compute minimum.
auto | argmin (Functor &&f) -> HandleT
| Compute minimal element.
auto | max (Functor &&f) -> typename std::decay< decltype(f(std::declval< HandleT >()))>::type
| Compute maximum.
auto | argmax (Functor &&f) -> HandleT
| Compute maximal element.
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.
auto | count_if (Functor &&f) -> int
| Compute number of elements that satisfy a given predicate.
auto | for_each (Functor &&f) -> void
| Apply a functor to each element.
auto | filtered (Functor &&f) -> FilteredSmartRangeT< SmartRange, Handle, Functor >
| Only iterate over a subset of elements.

## 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:

- OpenMesh/Core/Mesh/SmartRange.hh