6 #ifndef __AGGREGATE_K_MEANS_H__ 7 #define __AGGREGATE_K_MEANS_H__ 41 options(std::map<std::string, std::string>())
80 AggregateKMeansRequest(
const std::string& tableName_,
const std::vector<std::string>& columnNames_,
const int32_t k_,
const double tolerance_,
const std::map<std::string, std::string>& options_):
93 std::map<std::string, std::string>
options;
105 ::avro::encode(e, v.
k);
112 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
114 const std::vector<size_t> fo = rd->fieldOrder();
116 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
129 ::avro::decode(d, v.
k);
149 ::avro::decode(d, v.
k);
185 means(std::vector<std::vector<double> >()),
186 counts(std::vector<int64_t>()),
187 rmsDists(std::vector<double>()),
195 std::vector<std::vector<double> >
means;
211 ::avro::encode(e, v.
means);
212 ::avro::encode(e, v.
counts);
214 ::avro::encode(e, v.
count);
222 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
224 const std::vector<size_t> fo = rd->fieldOrder();
226 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
231 ::avro::decode(d, v.
means);
235 ::avro::decode(d, v.
counts);
243 ::avro::decode(d, v.
count);
265 ::avro::decode(d, v.
means);
266 ::avro::decode(d, v.
counts);
268 ::avro::decode(d, v.
count);
AggregateKMeansResponse()
Constructs an AggregateKMeansResponse object with default parameter values.
AggregateKMeansRequest(const std::string &tableName_, const std::vector< std::string > &columnNames_, const int32_t k_, const double tolerance_, const std::map< std::string, std::string > &options_)
Constructs an AggregateKMeansRequest object with the specified parameters.
A set of input parameters for aggregateKMeans(const AggregateKMeansRequest&) const.
std::map< std::string, std::string > options
std::vector< std::string > columnNames
std::vector< std::vector< double > > means
A set of output parameters for aggregateKMeans(const AggregateKMeansRequest&) const.
std::vector< int64_t > counts
std::vector< double > rmsDists
AggregateKMeansRequest()
Constructs an AggregateKMeansRequest object with default parameter values.