|
Macaulay2 Engine
|
Home-rolled std::span substitute and zipped-range view for the NC engines. More...
Go to the source code of this file.
Classes | |
| class | Range< T > |
| class | ZipIterator< U, T > |
| class | ConstZipIterator< U, T > |
| class | PairRange< U, T > |
Home-rolled std::span substitute and zipped-range view for the NC engines.
Declares the engine's C++17 stand-in for std::span. Range<T> is a pair of T*s representing [first, last) with begin() / end() accessors so it works in range-for, plus constructors for raw pointer pairs, std::pair<T*, T*> (the natural output of MemoryBlock::allocateArray<T>), std::vector<T>, the engine's VECTOR(T) macro, and the const-widening cross-type copy from Range<S>. PairRange<U, T> couples two equal-sized ranges and exposes ZipIterator / ConstZipIterator so a caller can walk monomials and coefficients (or any other parallel arrays) in a single loop without indexing arithmetic.
Consumed by NCF4 and NCGroebner for monomial / coefficient row payloads and by FreeAlgebra whenever multiplication yields a fresh stretch of arena-allocated terms. Bounds checking is intentionally omitted — the type stays exactly as fast as raw pointers in the inner loop.
Definition in file Range.hpp.