MCPcopy Create free account
hub / github.com/Singular/Singular / remove

Method remove

ppcc/adlib/arr.h:361–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359
360template <typename T>
361Arr<T> *Arr<T>::remove(Int start, Int count) {
362 require(start >= 0 && count >= 0 && start + count <= _len,
363 "index out of range");
364 Int end = start + count;
365 if (count <= 0) return 0;
366 memmove(_data + start, _data + end, sizeof(T) * (_len - end));
367 memset(_data + _len - count, 0, sizeof(T) * count);
368 _len -= count;
369 return shrink(false);
370}
371
372template <typename T>
373Arr<T> *Arr<T>::remove(Int at) {

Callers 7

simplifyMethod · 0.45
removeConeFunction · 0.45
actionPerformedMethod · 0.45
MainFunction · 0.45
ListFileTreeFunction · 0.45

Calls 1

requireFunction · 0.85

Tested by 2

MainFunction · 0.36