diff options
author | ignat <ignat@yandex-team.com> | 2024-08-06 11:47:47 +0300 |
---|---|---|
committer | ignat <ignat@yandex-team.com> | 2024-08-06 13:12:01 +0300 |
commit | b992a648e70ca7771833e02562bbd1bcac60932f (patch) | |
tree | c137a4416408632f62cd6615033a0907e534c52e | |
parent | 03cdd2da9245de42a5bed37355d703f62486ec21 (diff) | |
download | ydb-b992a648e70ca7771833e02562bbd1bcac60932f.tar.gz |
YT-22431: change protobuf method names to standard protobuf style
c25caa4efe1b2675e1073e26adabad60a16e2e5c
-rw-r--r-- | library/cpp/tdigest/tdigest.cpp | 16 |
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(); } |