|
| template<typename T, typename PROJ = std::identity> |
| bool | insertIntoSortedVector (std::vector< T > &vec, const T &ele, PROJ proj={}) |
| | Helper function for inserting an element into a sorted vector.
|
| template<typename R, typename PROJ = std::identity> |
| std::vector< typename R::value_type > | sorted (const R &r, PROJ proj={}) |
| | Helper function to create a sorted vector from an unsorted range.
|
| template<typename T, typename INNERPROJ = std::identity, typename OUTERPROJ = std::identity> |
| std::vector< std::vector< T > > | getAllDistinctCombinations (std::vector< RangedItr< typename std::vector< T >::const_iterator > > &inputs, INNERPROJ innerproj={}, OUTERPROJ outerproj={}) |
| | Get all valid, unique combinations of distinct elements from the input ranges.
|
template<typename T, typename INNERPROJ = std::identity, typename OUTERPROJ = std::identity>
| std::vector< std::vector< T > > DerivationFramework::TriggerMatchingUtils::getAllDistinctCombinations |
( |
std::vector< RangedItr< typename std::vector< T >::const_iterator > > & | inputs, |
|
|
INNERPROJ | innerproj = {}, |
|
|
OUTERPROJ | outerproj = {} ) |
Get all valid, unique combinations of distinct elements from the input ranges.
- Parameters
-
| inputs | The ranges over vectors of possible elements. |
The optional projection operations can be used to customize the sort keys used. innerproj is applied to elements of the inner vectors (that is, type T). outerproj is applied to elements of the outer vector (that is, inner vectors, of type std::vector<T>).
template<typename T, typename PROJ = std::identity>
| bool DerivationFramework::TriggerMatchingUtils::insertIntoSortedVector |
( |
std::vector< T > & | vec, |
|
|
const T & | ele, |
|
|
PROJ | proj = {} ) |
Helper function for inserting an element into a sorted vector.
- Template Parameters
-
| T | The type stored in the vector |
- Parameters
-
| [out] | vec | The vector to insert into |
| ele | The element to insert |
| proj | Projection operation. |
- Returns
- Whether or not the element was inserted. The element will not be inserted if it already exists.
If the optional projection operation is given, then the sort keys are found by applying proj() to the vector elements.
template<typename R, typename PROJ = std::identity>
| std::vector< typename R::value_type > DerivationFramework::TriggerMatchingUtils::sorted |
( |
const R & | r, |
|
|
PROJ | proj = {} ) |
Helper function to create a sorted vector from an unsorted range.
- Template Parameters
-
- Parameters
-
| proj | Projection operation. |
If the optional projection operation is given, then the sort keys are found by applying proj() to the vector elements.