MCPcopy Create free account
hub / github.com/catboost/catboost / Equal

Method Equal

util/generic/bitmap.h:881–902  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

879 }
880
881 bool Equal(const TThis& bitmap) const {
882 if (Mask.GetChunkCapacity() > bitmap.Mask.GetChunkCapacity()) {
883 for (size_t i = bitmap.Mask.GetChunkCapacity(); i < Mask.GetChunkCapacity(); ++i) {
884 if (0 != Mask.Data[i]) {
885 return false;
886 }
887 }
888 } else if (Mask.GetChunkCapacity() < bitmap.Mask.GetChunkCapacity()) {
889 for (size_t i = Mask.GetChunkCapacity(); i < bitmap.Mask.GetChunkCapacity(); ++i) {
890 if (0 != bitmap.Mask.Data[i]) {
891 return false;
892 }
893 }
894 }
895 size_t size = Min(Mask.GetChunkCapacity(), bitmap.Mask.GetChunkCapacity());
896 for (size_t i = 0; i < size; ++i) {
897 if (Mask.Data[i] != bitmap.Mask.Data[i]) {
898 return false;
899 }
900 }
901 return true;
902 }
903
904 template <class T>
905 Y_FORCE_INLINE bool Equal(const TBitMapOps<T>& bitmap) const {

Callers

nothing calls this directly

Calls 3

MinFunction · 0.70
EqualFunction · 0.70
GetChunkCapacityMethod · 0.45

Tested by

no test coverage detected