Allow random::weighted_distribution to release it's weights array
This commit is contained in:
parent
7ae3bbfe96
commit
3bfe867cc0
1 changed files with 5 additions and 0 deletions
|
|
@ -38,6 +38,11 @@ namespace psemek::random
|
|||
return it - prefix_sum_.begin();
|
||||
}
|
||||
|
||||
std::vector<T> release()
|
||||
{
|
||||
return std::move(prefix_sum_);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<T> prefix_sum_;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue