NetworKit
Large-Scale Network Analysis
Get Started
Documentation
Features
News
Publications
NetworKit Day
Credits & References
Python Documentation
C++ Documentation
Page Hierarchy
Class Hierarchy
File Hierarchy
Full API
Namespaces
Classes and Structs
Enums
Functions
Variables
Defines
Typedefs
Directories
Pages
Jupyter Notebook
Developer Guide
Template Function Aux::Random::weightedChoice
¶
Defined in
File Random.hpp
Function Documentation
¶
template
<
typename
Element
>
const
Element
&
Aux
::
Random
::
weightedChoice
(
const
std
::
vector
<
std
::
pair
<
Element
,
double
>
>
&
weightedElements
)
¶
Returns
:
a weighted random choice from a vector of elements with given weights.