aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorignat <ignat@yandex-team.com>2024-08-06 11:47:47 +0300
committerignat <ignat@yandex-team.com>2024-08-06 13:12:01 +0300
commitb992a648e70ca7771833e02562bbd1bcac60932f (patch)
treec137a4416408632f62cd6615033a0907e534c52e
parent03cdd2da9245de42a5bed37355d703f62486ec21 (diff)
downloadydb-b992a648e70ca7771833e02562bbd1bcac60932f.tar.gz
YT-22431: change protobuf method names to standard protobuf style
c25caa4efe1b2675e1073e26adabad60a16e2e5c
-rw-r--r--library/cpp/tdigest/tdigest.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/tdigest/tdigest.cpp b/library/cpp/tdigest/tdigest.cpp
index 2381db1b14..145cef78e1 100644
--- a/library/cpp/tdigest/tdigest.cpp
+++ b/library/cpp/tdigest/tdigest.cpp
@@ -24,11 +24,11 @@ TDigest::TDigest(TStringBuf serializedDigest)
{
NTDigest::TDigest digest;
Y_ABORT_UNLESS(digest.ParseFromArray(serializedDigest.data(), serializedDigest.size()));
- Delta = digest.GetDelta();
- K = digest.GetK();
+ Delta = digest.delta();
+ K = digest.k();
for (int i = 0; i < digest.centroids_size(); ++i) {
const NTDigest::TDigest::TCentroid& centroid = digest.centroids(i);
- Update(centroid.GetMean(), centroid.GetWeight());
+ Update(centroid.mean(), centroid.weight());
}
}
@@ -187,12 +187,12 @@ double TDigest::GetRank(double value) {
TString TDigest::Serialize() {
Compress();
NTDigest::TDigest digest;
- digest.SetDelta(Delta);
- digest.SetK(K);
+ digest.set_delta(Delta);
+ digest.set_k(K);
for (const auto& it : Centroids) {
- NTDigest::TDigest::TCentroid* centroid = digest.AddCentroids();
- centroid->SetMean(it.Mean);
- centroid->SetWeight(it.Count);
+ NTDigest::TDigest::TCentroid* centroid = digest.add_centroids();
+ centroid->set_mean(it.Mean);
+ centroid->set_weight(it.Count);
}
return digest.SerializeAsString();
}