-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
The select primitive(s) is required for multiple incoming algorithms.
For instance to threshold under/over a specified value, or in tril in order to filter depending on the coordinates.
The idea would be to generalise the incoming tril, triu and diag primitives.
grb::tril( L, A )->grb::select( L, A, grb::boolean_operators::is_lower_part<RIT, CIT>() )grb::triu( U, A )->grb::select( U, A, grb::boolean_operators::is_upper_part<RIT, CIT>() )grb::diag( D, A )->grb::select( D, A, grb::boolean_operators::is_diag<RIT, CIT>() )grb::diag( A )->grb::select( A, grb::boolean_operators::is_diag<RIT, CIT>() )
The diag boolean_operator would then have the following apply function:
template<
typename RIT, typename CIT, typename T,
typename BoolOrEquivalent = bool
>
BoolOrEquivalent apply( RIT i, CIT j, T value ) {
return static_cast<BoolOrEquivalent>( i == j );
}The naming is to be discussed, of course.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request