SUNphi  1.0
Filter.hpp File Reference

Filter elements of a list according to a rule. More...

#include <ints/IntSeqCat.hpp>
#include <ints/Ranges.hpp>

Go to the source code of this file.

Classes

class  SUNphi::_FilterVariadicList< F, I,... >
 
class  SUNphi::_FilterVariadicList< F, IntSeq< P... >, T... >
 
class  SUNphi::_FilterVariadicClass< F, L >
 
class  SUNphi::_FilterVariadicClass< F, V< List... > >
 Get the position of elements of a vector, satisfying a condition. More...
 
struct  SUNphi::IsNotNull< I >
 Filterer which check non-nullity of its parameter. More...
 
struct  SUNphi::IsNonNegative< I >
 Filterer which check non-negativity of its parameter. More...
 
struct  SUNphi::IsAlwaysTrue< I >
 Filterer which check nothing. More...
 

Typedefs

template<template< auto > typename F, auto... T>
using SUNphi::FilterVariadicList = typename _FilterVariadicList< F, RangeSeq< 0, 1, sizeof...(T)>, T... >::Res
 
template<template< auto > typename F, typename L >
using SUNphi::FilterVariadicClassPos = typename _FilterVariadicClass< F, L >::Pos
 

Detailed Description

Filter elements of a list according to a rule.

Todo:
Expand as here https://stackoverflow.com/questions/41723704/how-to-filter-a-stdinteger-sequence

Definition in file Filter.hpp.

Typedef Documentation

template<template< auto > typename F, typename L >
using SUNphi::FilterVariadicClassPos = typedef typename _FilterVariadicClass<F,L>::Pos

Get the position of elements of a vector, satisfying a condition

Gets a vector-like incapsulated list of variables, and returns a IntSeq containing the position of those that satisfy a certain condition.

Example:

:
FilterVariadicClassPos<IsNotNull,IntSeq<0,1,0,10>>; // IntSeq<0,3>;

Definition at line 93 of file Filter.hpp.

template<template< auto > typename F, auto... T>
using SUNphi::FilterVariadicList = typedef typename _FilterVariadicList<F, RangeSeq<0, 1, sizeof...(T)>, T...>::Res

Get the position of elements satisfying a rule.

Gets a set of variables as template parameter, and a condition F, returns the position of those which passes the filter F.

Definition at line 55 of file Filter.hpp.