MyraMath
Public Types | Public Member Functions | List of all members
myra::CVectorRange< Number > Class Template Reference

Represents a const VectorRange. More...

#include <VectorRange.h>

Collaboration diagram for myra::CVectorRange< Number >:
[legend]

Public Types

typedef std::pair< CVectorRange< Number >, CVectorRange< Number > > Pair
 

Public Member Functions

 CVectorRange ()
 Default constructs a size 0 range.
 
 CVectorRange (const Number *in_begin, int in_N)
 Constructs from components.
 
void write (OutputStream &out) const
 Writes to OutputStream. Layout compatible with Vector's InputStream constructor.
 
int size () const
 Size inspector.
 
int n_words () const
 Storage requirements.
 
VectorRange< Number > remove_const () const
 Casts away "const" (C) qualifier, returning a VectorRange<Number>
 
CVectorRange< Number > window (int n0, int n1) const
 Returns this(n0:n1)
 
Array1< CVectorRange< Number > > windows (const intCRange &n) const
 Returns multiple windows using given sizes.
 
CMatrixRange< Number > column () const
 Constructs an Nx1 column-shaped CMatrixRange from *this.
 
CMatrixRange< Number > row () const
 Constructs a 1xN row-shaped CMatrixRange from *this.
 
const Number & operator() (int n) const
 Random accessor.
 
const Number & operator[] (int n) const
 
const Number & at (int n) const
 Bounds checked random accessor.
 
CVectorRange< Number > first (int n) const
 Returns the first n entries, this(0:n)
 
CVectorRange< Number > 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)].
 
CVectorRange< Number > last (int n) const
 Returns the last n entries, this(N-n:N)
 
CVectorRange< Number > 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)].
 

Public Attributes

const Number * begin
 ---------— Data members, all public ----------------—
 
int N
 ---------— Data members, all public ----------------—
 

Detailed Description

template<class Number>
class myra::CVectorRange< Number >

Represents a const VectorRange.


The documentation for this class was generated from the following files: