Geometric clustering

Builder

template<typename T>
class ClusterTreeBuilder

Public Functions

inline void set_maximal_leaf_size(int maximal_leaf_size)
inline void set_is_complete(bool is_complete)
inline void set_partitioning_strategy(std::shared_ptr<VirtualPartitioning<T>> partitioning_strategy)
Cluster<T> create_cluster_tree(int number_of_points, int spatial_dimension, const T *coordinates, const T *radii, const T *weights, int number_of_children, int size_of_partition, const int *partition, bool is_given_partition_local) const
inline Cluster<T> create_cluster_tree(int number_of_points, int spatial_dimension, const T *coordinates, int number_of_children, int size_of_partition) const
inline Cluster<T> create_cluster_tree_from_global_partition(int number_of_points, int spatial_dimension, const T *coordinates, int number_of_children, int size_of_partition, const int *partition) const
inline Cluster<T> create_cluster_tree_from_local_partition(int number_of_points, int spatial_dimension, const T *coordinates, int number_of_children, int size_of_partition, const int *partition) const

Cluster

template<typename CoordinatesPrecision>
class Cluster : public htool::TreeNode<Cluster<CoordinatesPrecision>, ClusterTreeData<CoordinatesPrecision>>

Public Functions

inline Cluster(CoordinatesPrecision radius, std::vector<CoordinatesPrecision> &center, int rank, int offset, int size)
inline Cluster(const Cluster &parent, CoordinatesPrecision radius, std::vector<CoordinatesPrecision> &center, int rank, int offset, int size, int counter, bool is_on_partition)
Cluster(const Cluster&) = delete
Cluster &operator=(const Cluster&) = delete
Cluster(Cluster &&cluster) noexcept = default
Cluster &operator=(Cluster &&cluster) noexcept = default
virtual ~Cluster() = default
inline const CoordinatesPrecision &get_radius() const
inline const std::vector<CoordinatesPrecision> &get_center() const
inline int get_rank() const
inline int get_offset() const
inline int get_size() const
inline int get_counter() const
inline bool is_permutation_local() const
inline unsigned int get_maximal_depth() const
inline unsigned int get_minimal_depth() const
inline unsigned int get_maximal_leaf_size() const
inline const std::vector<const Cluster<CoordinatesPrecision>*> &get_clusters_on_partition() const
inline const Cluster<CoordinatesPrecision> &get_cluster_on_partition(size_t index) const
inline const Cluster<CoordinatesPrecision> &get_root_cluster() const
inline const std::vector<int> &get_permutation() const
inline std::vector<int> &get_permutation()
inline void set_is_permutation_local(bool is_permutation_local)
inline void set_minimal_depth(unsigned int minimal_depth)
inline void set_maximal_depth(unsigned int maximal_depth)
inline void set_maximal_leaf_size(unsigned int maximal_leaf_size)
inline bool operator==(const Cluster<CoordinatesPrecision> &rhs) const

Partitioning interface

template<typename CoordinatePrecision>
class VirtualPartitioning

Subclassed by htool::Partitioning< CoordinatePrecision, ComputationDirectionPolicy, SplittingPolicy >, htool::Partitioning_N< CoordinatePrecision, ComputationDirectionPolicy, SplittingPolicy >

Public Functions

virtual std::vector<std::pair<int, int>> compute_partitioning(Cluster<CoordinatePrecision> &current_cluster, int spatial_dimension, const CoordinatePrecision *coordinates, const CoordinatePrecision *const radii, const CoordinatePrecision *const weights, int number_of_partitions) = 0
inline virtual ~VirtualPartitioning()
template<typename CoordinatePrecision, typename ComputationDirectionPolicy, typename SplittingPolicy>
class Partitioning : public htool::VirtualPartitioning<CoordinatePrecision>

Public Functions

inline virtual std::vector<std::pair<int, int>> compute_partitioning(Cluster<CoordinatePrecision> &current_cluster, int spatial_dimension, const CoordinatePrecision *coordinates, const CoordinatePrecision *const radii, const CoordinatePrecision *const weights, int number_of_partitions) override

Direction computation strategies

template<typename T>
class ComputeLargestExtent

Public Static Functions

static inline std::pair<Matrix<T>, std::vector<T>> compute_direction(const Cluster<T> &cluster, int spatial_dimension, const T *const coordinates, const T*const, const T *const weights)
template<typename T>
class ComputeBoundingBox

Public Static Functions

static inline std::pair<Matrix<T>, std::vector<T>> compute_direction(const Cluster<T> &cluster, int spatial_dimension, const T *const coordinates, const T*const, const T*const)

Splitting strategies

template<typename T>
class GeometricSplitting

Public Static Functions

static inline std::vector<std::pair<int, int>> splitting(int offset, int size, int spatial_dimension, const T *const coordinates, const std::vector<int> &permutation, const std::vector<T> &direction, int number_of_partition)
template<typename T>
class RegularSplitting

Public Static Functions

static inline std::vector<std::pair<int, int>> splitting(int offset, int size, int, const T*const, const std::vector<int>&, const std::vector<T>&, int number_of_partition)

Visualisation

template<typename CoordinatesPrecision>
void htool::save_clustered_geometry(const Cluster<CoordinatesPrecision> &cluster_tree, int spatial_dimension, const CoordinatesPrecision *x0, std::string filename, const std::vector<int> &depths)