MCPcopy Create free account
hub / github.com/colmap/colmap / Sample

Method Sample

src/colmap/optim/random_sampler.cc:51–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void RandomSampler::Sample(std::vector<size_t>* sampled_idxs) {
52 Shuffle(static_cast<uint32_t>(num_samples_), &sample_idxs_);
53
54 sampled_idxs->resize(num_samples_);
55 for (size_t i = 0; i < num_samples_; ++i) {
56 (*sampled_idxs)[i] = sample_idxs_[i];
57 }
58}
59
60} // namespace colmap

Callers 4

TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 1

ShuffleFunction · 0.85

Tested by 3

TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36