Skip to content
Snippets Groups Projects
Commit 3b21036e authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add method DiscreteDistribution::totalWeight

parent 22b27ea4
No related branches found
No related tags found
No related merge requests found
......@@ -107,6 +107,12 @@ namespace hpp {
return proba;
}
/// Return the total weight.
Weight_t totalWeight () const {
if (cumulative_weights_.empty ()) return 0;
return cumulative_weights_.back ();
}
/// \name Iterators
/// Iterate on the values.
/// \{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment