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

Method SubRegion

util/generic/array_ref.h:225–235  ·  view source on GitHub ↗

FIXME: * This method is placed here for backward compatibility only and should be removed. * Keep in mind that it's behavior is different from Slice(): * SubRegion() never throws. It returns empty TArrayRef in case of invalid input. * * DEPRECATED. DO NOT USE. */

Source from the content-addressed store, hash-verified

223 * DEPRECATED. DO NOT USE.
224 */
225 TArrayRef SubRegion(size_t offset, size_t size) const noexcept {
226 if (size == 0 || offset >= S_) {
227 return TArrayRef();
228 }
229
230 if (size > S_ - offset) {
231 size = S_ - offset;
232 }
233
234 return TArrayRef(T_ + offset, size);
235 }
236
237 // DEPRECATED. DO NOT USE.
238 constexpr inline yssize_t ysize() const noexcept {

Callers 1

Y_UNIT_TESTFunction · 0.80

Calls 1

TArrayRefClass · 0.70

Tested by

no test coverage detected