Template Class SimpleKmeans¶
Defined in File simple-kmeans.h
Class Documentation¶
-
template<class Feature, class Distance = distance::L2<Feature>, class FeatureAllocator = typename DefaultAllocator<Feature>::type>
class loop_closure::SimpleKmeans¶ Public Types
-
typedef std::shared_ptr<std::vector<Feature, FeatureAllocator>> Centers¶
-
typedef std::function<void(const std::vector<Feature*>&, size_t, Distance, int random_seed, std::vector<Feature, FeatureAllocator>*)> Initializer¶
Public Functions
-
inline void SetInitMethod(const Initializer &init)¶
-
inline size_t GetMaxIterations() const¶
-
inline void SetMaxIterations(size_t iters)¶
-
inline size_t GetRestarts() const¶
-
inline void SetRestarts(size_t restarts)¶
-
SquaredDistanceType Cluster(const std::vector<Feature, FeatureAllocator> &features, size_t k, int random_seed, std::vector<unsigned int> *const membership, Centers *const centers) const¶
-
SquaredDistanceType ClusterPointers(const std::vector<Feature*> &features, size_t k, int random_seed, Centers *const centers, std::vector<unsigned int> *const membership) const¶
-
typedef std::shared_ptr<std::vector<Feature, FeatureAllocator>> Centers¶