1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
/*!
@authors Andrei Novikov (pyclustering@yandex.ru)
@date 2014-2020
@copyright BSD-3-Clause
*/
#pragma once
#include <memory>
#include <vector>
#include <pyclustering/cluster/cluster_data.hpp>
#include <pyclustering/definitions.hpp>
namespace pyclustering {
namespace clst {
/**
*
* @brief Clustering results of K-Medians algorithm that consists of information about allocated
* clusters and medians of each cluster.
*
*/
class kmedians_data : public cluster_data {
private:
dataset m_medians = { };
public:
/**
*
* @brief Default constructor that creates empty clustering data.
*
*/
kmedians_data() = default;
/**
*
* @brief Copy constructor that creates clustering data that is the same to specified.
*
* @param[in] p_other: another clustering data.
*
*/
kmedians_data(const kmedians_data & p_other) = default;
/**
*
* @brief Move constructor that creates clustering data from another by moving data.
*
* @param[in] p_other: another clustering data.
*
*/
kmedians_data(kmedians_data && p_other) = default;
/**
*
* @brief Default destructor that destroys clustering data.
*
*/
virtual ~kmedians_data() = default;
public:
/**
*
* @brief Returns reference to medians that correspond to allocated clusters.
*
*/
dataset & medians() { return m_medians; }
/**
*
* @brief Returns constant reference to medians that correspond to allocated clusters.
*
*/
const dataset & medians() const { return m_medians; }
};
}
}
|