Function create

Synopsis

#include <Source/Falcor/Utils/Sampling/AliasTable.h>

static SharedPtr create(std::vector< float > weights, std::mt19937 &rng)

Description

Create an alias table. The weights don't need to be normalized to sum up to 1.

Parameters

[ in ] weights - The weights we'd like to sample each entry proportional to.

[ in ] rng - The random number generator to use when creating the table.

Returns
The alias table.

Source

Lines 33-36 in Source/Falcor/Utils/Sampling/AliasTable.cpp. Line 46 in Source/Falcor/Utils/Sampling/AliasTable.h.

AliasTable::SharedPtr AliasTable::create(std::vector<float> weights, std::mt19937& rng)
{
    return SharedPtr(new AliasTable(std::move(weights), rng));
}





Add Discussion as Guest

Log in