ellipsoid_tree 0.1.0
Exact intersection tests for ellipsoids and friends
Loading...
Searching...
No Matches
batch_picker.hpp File Reference

Greedy partition of a family of ellipsoids into batches of mutually non-overlapping members. More...

#include <algorithm>
#include <numeric>
#include <stdexcept>
#include <vector>
#include <Eigen/Dense>
#include "ellipsoid_tree/object_tree.hpp"
#include "ellipsoid_tree/detail/parallel_for.hpp"

Namespaces

namespace  ellipsoid_tree
 

Functions

std::vector< std::vector< int > > ellipsoid_tree::pick_ellipsoid_batches (const EllipsoidTree &tree, const Eigen::Ref< const Eigen::MatrixXd > &anchor_points, int max_batches=-1, int num_threads=0)
 Partition the ellipsoids of tree (at the tree's tau) into batches of mutually non-intersecting ellipsoids.
 
std::vector< std::vector< int > > ellipsoid_tree::pick_ellipsoid_batches (const EllipsoidTree &tree, int max_batches=-1, int num_threads=0)
 Convenience: use the ellipsoid centers as anchors.
 

Detailed Description

Greedy partition of a family of ellipsoids into batches of mutually non-overlapping members.

Motivating application: point-spread-function probing, where impulse responses with non-overlapping supports can be probed simultaneously, so fewer batches means fewer operator applications.

The pairwise overlap graph is computed once by dual-tree self-collision; batches are then greedy independent sets. Candidates are considered in farthest-point order of their anchor points — ellipsoids whose anchors are far from everything already picked come first — which spreads each batch evenly through the domain.