helpers.h 845 B

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include "public.h"
  3. namespace NErasure {
  4. // All vectors here are assumed to be sorted.
  5. TPartIndexList MakeSegment(int begin, int end);
  6. TPartIndexList MakeSingleton(int elem);
  7. TPartIndexList Difference(int begin, int end, const TPartIndexList& subtrahend);
  8. TPartIndexList Difference(const TPartIndexList& first, const TPartIndexList& second);
  9. TPartIndexList Difference(const TPartIndexList& first, int elem);
  10. TPartIndexList Intersection(const TPartIndexList& first, const TPartIndexList& second);
  11. TPartIndexList Union(const TPartIndexList& first, const TPartIndexList& second);
  12. bool Contains(const TPartIndexList& set, int elem);
  13. TPartIndexList UniqueSortedIndices(const TPartIndexList& indices);
  14. TPartIndexList ExtractRows(const TPartIndexList& matrix, int width, const TPartIndexList& rows);
  15. } // namespace NErasure