Class ParticleClusterizer

Class Documentation

class ParticleClusterizer

Particle clusterizer implementation.

Public Functions

inline explicit ParticleClusterizer(const ParticleClusterizerParam &parameters)

Constructor that initializes the ParticleClusterizer with given parameters.

inline auto neighbors(const Sophus::SE2d &pose) const

Computes the neighboring cells for a given pose using the spatial hash function.

Parameters:

pose – The pose for which neighboring cells are computed.

Returns:

A range of spatial hashes corresponding to the neighboring cells.

template<class States, class Weights>
inline auto operator()(States &&states, Weights &&weights)

Clusters the given particles based on their states and weights.

Template Parameters:
  • States – Range type of the states.

  • Weights – Range type of the weights.

Parameters:
  • states – Range containing the states of the particles.

  • weights – Range containing the weights of the particles.

Returns:

A vector of cluster IDs corresponding to the input particles.