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

Method SampleXY

src/colmap/optim/sampler.h:87–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85
86template <typename X_t, typename Y_t>
87void Sampler::SampleXY(const X_t& X, const Y_t& Y, X_t* X_rand, Y_t* Y_rand) {
88 THROW_CHECK_EQ(X.size(), Y.size());
89 THROW_CHECK_EQ(X_rand->size(), Y_rand->size());
90 thread_local std::vector<size_t> sampled_idxs;
91 Sample(&sampled_idxs);
92 for (size_t i = 0; i < X_rand->size(); ++i) {
93 (*X_rand)[i] = X[sampled_idxs[i]];
94 (*Y_rand)[i] = Y[sampled_idxs[i]];
95 }
96}
97
98} // namespace colmap

Callers 2

EstimateMethod · 0.80
EstimateMethod · 0.80

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected