MyraMath
|
Represents a const intRange. More...
#include <intRange.h>
Public Types | |
typedef std::pair< intCRange, intCRange > | Pair |
Public Member Functions | |
intCRange () | |
Default constructs a size 0 range. | |
intCRange (const int *in_begin, int in_N) | |
Constructs from components. | |
intCRange (const std::vector< int > &v) | |
Constructs range over existing std::vector. | |
intCRange (std::initializer_list< int > l) | |
Constructs range over existing std::initializer_list. | |
void | write (OutputStream &out) const |
Writes to OutputStream. Layout compatible with std::vector<int>'s InputStream reader. | |
int | size () const |
Size inspector. | |
int | n_words () const |
Storage requirements. | |
intRange | remove_const () const |
Casts away "const" (C) qualifier, returning an intRange. | |
intCRange | window (int n0, int n1) const |
Returns this(n0:n1) | |
Array1< intCRange > | windows (const intCRange &n) const |
Returns multiple windows using given sizes. | |
const int & | operator() (int n) const |
Random accessor. | |
const int & | operator[] (int n) const |
const int & | at (int n) const |
Bounds checked random accessor. | |
intCRange | first (int n) const |
Returns the first n entries, this(0:n) | |
intCRange | cut_first (int n) const |
Cuts the first n entries, returns this(n:N) | |
Pair | split_first (int n) const |
Splits this range, returns [this->first(n), this->cut_first(n)]. | |
intCRange | last (int n) const |
Returns the last n entries, this(N-n:N) | |
intCRange | cut_last (int n) const |
Cuts the last n entries, returns this (0:N-n) | |
Pair | split_last (int n) const |
Splits this range, returns [this->cut_last(n), this->last(n)]. | |
std::vector< int > | make_vector () const |
Deep copy into a std::vector. | |
Public Attributes | |
const int * | begin |
---------— Data members, all public ----------------— | |
int | N |
---------— Data members, all public ----------------— | |
Represents a const intRange.