diff options
author | qrort <qrort@yandex-team.com> | 2022-11-30 23:47:12 +0300 |
---|---|---|
committer | qrort <qrort@yandex-team.com> | 2022-11-30 23:47:12 +0300 |
commit | 22f8ae0e3f5d68b92aecccdf96c1d841a0334311 (patch) | |
tree | bffa27765faf54126ad44bcafa89fadecb7a73d7 /library/cpp/erasure/helpers.h | |
parent | 332b99e2173f0425444abb759eebcb2fafaa9209 (diff) | |
download | ydb-22f8ae0e3f5d68b92aecccdf96c1d841a0334311.tar.gz |
validate canons without yatest_common
Diffstat (limited to 'library/cpp/erasure/helpers.h')
-rw-r--r-- | library/cpp/erasure/helpers.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/library/cpp/erasure/helpers.h b/library/cpp/erasure/helpers.h new file mode 100644 index 0000000000..741186322a --- /dev/null +++ b/library/cpp/erasure/helpers.h @@ -0,0 +1,30 @@ +#pragma once + +#include "public.h" + +namespace NErasure { + +// All vectors here are assumed to be sorted. + +TPartIndexList MakeSegment(int begin, int end); + +TPartIndexList MakeSingleton(int elem); + +TPartIndexList Difference(int begin, int end, const TPartIndexList& subtrahend); + +TPartIndexList Difference(const TPartIndexList& first, const TPartIndexList& second); + +TPartIndexList Difference(const TPartIndexList& first, int elem); + +TPartIndexList Intersection(const TPartIndexList& first, const TPartIndexList& second); + +TPartIndexList Union(const TPartIndexList& first, const TPartIndexList& second); + +bool Contains(const TPartIndexList& set, int elem); + +TPartIndexList UniqueSortedIndices(const TPartIndexList& indices); + +TPartIndexList ExtractRows(const TPartIndexList& matrix, int width, const TPartIndexList& rows); + +} // namespace NErasure + |