[yul-phaser] Population: Add combine()

This commit is contained in:
Kamil Śliwak
2020-04-06 19:06:08 +02:00
parent ef8d0888af
commit 8c86a4983d
3 changed files with 14 additions and 0 deletions
+5
View File
@@ -163,6 +163,11 @@ Population operator+(Population _a, Population _b)
}
Population Population::combine(std::tuple<Population, Population> _populationPair)
{
return get<0>(_populationPair) + get<1>(_populationPair);
}
bool Population::operator==(Population const& _other) const
{
// We consider populations identical only if they share the same exact instance of the metric.