Ref T298, utility functions for matcher setup and more attributes to configure matching

* pick strategy if multiple there are multiple similar results
* ordered results
This commit is contained in:
Klaus Basan
2018-08-11 00:43:35 +02:00
parent cd701c2a95
commit 3aadef458d
6 changed files with 156 additions and 13 deletions

View File

@@ -127,6 +127,13 @@ namespace BlackMisc
return equalsBy(other, BlackMisc::Predicates::EqualsByMembers(k0, keys...));
}
//! Pick one random element
template <class T>
T randomElement() const
{
return this->randomElements(1).front();
}
//! Copy n elements from the container at random.
Derived randomElements(int n) const
{