diff options
author | aozeritsky <aozeritsky@ydb.tech> | 2023-08-21 17:15:26 +0300 |
---|---|---|
committer | aozeritsky <aozeritsky@ydb.tech> | 2023-08-21 17:30:24 +0300 |
commit | 6128c83f475b712a95f262e363dd2d3681500a0e (patch) | |
tree | fb52e4fa7d0dccb6bc4e6ced2707e11bfaf2e4b3 /library/cpp/erasure/helpers.h | |
parent | eac8ca1f552726198b4d7a21fcdecf8954339262 (diff) | |
download | ydb-6128c83f475b712a95f262e363dd2d3681500a0e.tar.gz |
Add yt into autobuild
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 + |