26 using namespace gtsam;
29 vector<double> weights{1, 2, 3, 4, 3, 2, 1};
static int runAllTests(TestResult &result)
Fast sampling without replacement.
TEST(WeightedSampler, sampleWithoutReplacement)
#define EXPECT_LONGS_EQUAL(expected, actual)
std::vector< size_t > sampleWithoutReplacement(size_t numSamples, const std::vector< double > &weights)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set samples