|
Macaulay2 Engine
|
Non-owning view of a non-commutative word: [begin, end) of int variable indices. More...
#include <Word.hpp>
Public Member Functions | |
| Word () | |
| Word (const int *begin, const int *end) | |
| Word (const std::vector< int > &val) | |
| void | init (const int *begin, const int *end) |
| const int * | begin () const |
| const int * | end () const |
| int | size () const |
| bool | operator== (Word rhs) const |
| int | operator[] (int i) const |
Private Attributes | |
| const int * | mBegin |
| const int * | mEnd |
| int | mSize |
Non-owning view of a non-commutative word: [begin, end) of int variable indices.
Stores three pointers / lengths (mBegin, mEnd, mSize) into an externally owned buffer (typically a MemoryBlock arena in NCF4). The view is cheap to copy and pass around but the caller must keep the backing buffer alive for the Word's lifetime. Equality is elementwise; iteration goes through begin() / end() / operator[].