MRandomSet

Engine/source/math/mRandomSet.h

More...

Public Functions

add(const T & item, F32 probability)
T
get()

Return a random item from the set using the specified per item probability distribution.

Detailed Description

Protected Attributes

Vector< T > mItems 
Vector< F32 > mProbability 
MRandomLCG * mRandGen 
F32 mSum 

Public Functions

MRandomSet(MRandomLCG * randGen)

add(const T & item, F32 probability)

get()

Return a random item from the set using the specified per item probability distribution.