ARTS
2.0.49
|
The range class. More...
#include <matpackI.h>
Public Member Functions | |
Range (Index start, Index extent, Index stride=1) | |
Range (Index start, Joker j, Index stride=1) | |
Constructor with joker extent. More... | |
Range (Joker j, Index stride=1) | |
Constructor with just a joker. More... | |
Range (Index max_size, const Range &r) | |
Constructor which converts a range with joker to an explicit range. More... | |
Range (const Range &p, const Range &n) | |
Constructor of a new range relative to an old range. More... | |
Index | get_start () const |
Returns the start index of the range. More... | |
Index | get_extent () const |
Returns the extent of the range. More... | |
Index | get_stride () const |
Returns the stride of the range. More... | |
Private Attributes | |
Index | mstart |
The start index. More... | |
Index | mextent |
The number of elements. More... | |
Index | mstride |
The stride. More... | |
Friends | |
class | ConstVectorView |
class | VectorView |
class | Vector |
class | ConstMatrixView |
class | MatrixView |
class | Matrix |
class | Iterator2D |
class | Iterator3D |
class | Iterator4D |
class | Iterator5D |
class | Iterator6D |
class | Iterator7D |
class | ConstIterator2D |
class | ConstIterator3D |
class | ConstIterator4D |
class | ConstIterator5D |
class | ConstIterator6D |
class | ConstIterator7D |
class | ConstTensor3View |
class | Tensor3View |
class | Tensor3 |
class | ConstTensor4View |
class | Tensor4View |
class | Tensor4 |
class | ConstTensor5View |
class | Tensor5View |
class | Tensor5 |
class | ConstTensor6View |
class | Tensor6View |
class | Tensor6 |
class | ConstTensor7View |
class | Tensor7View |
class | Tensor7 |
class | Sparse |
void | mult (VectorView, const ConstMatrixView &, const ConstVectorView &) |
Matrix Vector multiplication. More... | |
The range class.
This is used to specifiy a range of a vector. In general, a range is given by a start index, an extent, and a stride. The entire vector would be: start = 0, range = # elements, stride = 1
Stride specifies the stepsize of the vector. A stride of 2 means only every second element. This is particularly important in connection with matrices.
There are a number of special constructors for this class, of particular interest should be those using jokers, which provide a Matlab-like functionality.
Definition at line 148 of file matpackI.h.
Definition at line 47 of file matpackI.cc.
Constructor with joker extent.
Depending on the sign of stride, this means "to the end", or "to the beginning".
Definition at line 63 of file matpackI.cc.
References mstart.
Constructor with just a joker.
This means, take everything. You can still optionally give a stride, though. This constructor is just shorter notation for Range(0,joker)
Definition at line 73 of file matpackI.cc.
Constructor which converts a range with joker to an explicit range.
max_size | The maximum allowed size of the vector. |
r | The new range, with joker. |
Definition at line 84 of file matpackI.cc.
Constructor of a new range relative to an old range.
The new range may contain -1 for the stride, which acts as a joker.
p | Previous range. |
n | New range. |
Definition at line 121 of file matpackI.cc.
|
inline |
|
inline |
Returns the start index of the range.
Definition at line 196 of file matpackI.h.
References mstart.
Referenced by jacobianCalcFreqShiftAndStretchInterp(), jacobianCalcPointingZaInterp(), jacobianCalcPointingZaRecalc(), jacobianCalcPolyfit(), and yCalc().
|
inline |
|
friend |
Definition at line 170 of file matpackI.h.
|
friend |
Definition at line 171 of file matpackI.h.
|
friend |
Definition at line 172 of file matpackI.h.
|
friend |
Definition at line 173 of file matpackI.h.
|
friend |
Definition at line 174 of file matpackI.h.
|
friend |
Definition at line 175 of file matpackI.h.
|
friend |
Definition at line 161 of file matpackI.h.
|
friend |
Definition at line 176 of file matpackI.h.
|
friend |
Definition at line 179 of file matpackI.h.
|
friend |
Definition at line 182 of file matpackI.h.
|
friend |
Definition at line 185 of file matpackI.h.
|
friend |
Definition at line 188 of file matpackI.h.
|
friend |
Definition at line 158 of file matpackI.h.
|
friend |
Definition at line 164 of file matpackI.h.
|
friend |
Definition at line 165 of file matpackI.h.
|
friend |
Definition at line 166 of file matpackI.h.
|
friend |
Definition at line 167 of file matpackI.h.
|
friend |
Definition at line 168 of file matpackI.h.
|
friend |
Definition at line 169 of file matpackI.h.
|
friend |
Definition at line 163 of file matpackI.h.
|
friend |
Definition at line 162 of file matpackI.h.
|
friend |
y = M*x. Note that the order is different from MTL, output comes first! Dimensions of y, M, and x must match. No memory reallocation takes place, only the data is copied. Using this function on overlapping MatrixViews belonging to the same Matrix will lead to unpredictable results. In particular, this means that A and B must not be the same matrix! The implementation here is different from the other multiplication routines. It does not use iterators but a more drastic approach to gain maximum performance.
Definition at line 1607 of file matpackI.cc.
|
friend |
Definition at line 191 of file matpackI.h.
|
friend |
Definition at line 178 of file matpackI.h.
|
friend |
Definition at line 177 of file matpackI.h.
|
friend |
Definition at line 181 of file matpackI.h.
|
friend |
Definition at line 180 of file matpackI.h.
|
friend |
Definition at line 184 of file matpackI.h.
|
friend |
Definition at line 183 of file matpackI.h.
|
friend |
Definition at line 187 of file matpackI.h.
|
friend |
Definition at line 186 of file matpackI.h.
|
friend |
Definition at line 190 of file matpackI.h.
|
friend |
Definition at line 189 of file matpackI.h.
|
friend |
Definition at line 160 of file matpackI.h.
|
friend |
Definition at line 159 of file matpackI.h.
|
private |
The number of elements.
-1 means extent to the end of the vector.
Definition at line 207 of file matpackI.h.
Referenced by VectorView::end(), MatrixView::end(), Tensor3View::end(), Tensor4View::end(), Tensor5View::end(), Tensor6View::end(), Tensor7View::end(), ConstVectorView::end(), ConstMatrixView::end(), ConstTensor3View::end(), ConstTensor4View::end(), ConstTensor5View::end(), ConstTensor6View::end(), ConstTensor7View::end(), Tensor3View::get_c_array(), Tensor4View::get_c_array(), Tensor5View::get_c_array(), MatrixView::get_c_array(), get_extent(), mult(), ConstTensor4View::nbooks(), ConstTensor5View::nbooks(), ConstTensor6View::nbooks(), ConstTensor7View::nbooks(), ConstMatrixView::ncols(), ConstTensor3View::ncols(), ConstTensor4View::ncols(), ConstTensor5View::ncols(), ConstTensor6View::ncols(), ConstTensor7View::ncols(), ConstVectorView::nelem(), ConstTensor7View::nlibraries(), ConstTensor3View::npages(), ConstTensor4View::npages(), ConstTensor5View::npages(), ConstTensor6View::npages(), ConstTensor7View::npages(), ConstMatrixView::nrows(), ConstTensor3View::nrows(), ConstTensor4View::nrows(), ConstTensor5View::nrows(), ConstTensor6View::nrows(), ConstTensor7View::nrows(), ConstTensor5View::nshelves(), ConstTensor6View::nshelves(), ConstTensor7View::nshelves(), ConstTensor6View::nvitrines(), ConstTensor7View::nvitrines(), Tensor4View::operator()(), ConstTensor4View::operator()(), Tensor3View::operator()(), ConstTensor3View::operator()(), MatrixView::operator()(), ConstMatrixView::operator()(), Tensor5View::operator()(), ConstTensor5View::operator()(), MatrixView::operator=(), Tensor3View::operator=(), Tensor4View::operator=(), Tensor5View::operator=(), Tensor6View::operator=(), Tensor7View::operator=(), VectorView::operator=(), Matrix::operator=(), Tensor3::operator=(), Tensor4::operator=(), Tensor5::operator=(), Tensor6::operator=(), Tensor7::operator=(), VectorView::operator[](), ConstVectorView::operator[](), Range(), Tensor4::resize(), Tensor7::resize(), Vector::resize(), Tensor3::resize(), Matrix::resize(), Tensor5::resize(), and Tensor6::resize().
|
private |
The start index.
Definition at line 204 of file matpackI.h.
Referenced by VectorView::begin(), MatrixView::begin(), Tensor3View::begin(), Tensor4View::begin(), Tensor5View::begin(), Tensor6View::begin(), Tensor7View::begin(), ConstVectorView::begin(), ConstMatrixView::begin(), ConstTensor3View::begin(), ConstTensor4View::begin(), ConstTensor5View::begin(), ConstTensor6View::begin(), ConstTensor7View::begin(), VectorView::end(), MatrixView::end(), Tensor3View::end(), Tensor4View::end(), Tensor5View::end(), Tensor6View::end(), Tensor7View::end(), ConstVectorView::end(), ConstMatrixView::end(), ConstTensor3View::end(), ConstTensor4View::end(), ConstTensor5View::end(), ConstTensor6View::end(), ConstTensor7View::end(), Tensor3View::get_c_array(), Tensor4View::get_c_array(), Tensor5View::get_c_array(), VectorView::get_c_array(), MatrixView::get_c_array(), get_start(), mult(), ConstIterator2D::operator!=(), ConstIterator3D::operator!=(), ConstIterator4D::operator!=(), ConstIterator5D::operator!=(), ConstIterator6D::operator!=(), ConstIterator7D::operator!=(), Iterator2D::operator!=(), Iterator3D::operator!=(), Iterator4D::operator!=(), Iterator5D::operator!=(), Iterator6D::operator!=(), Iterator7D::operator!=(), Tensor4View::operator()(), ConstTensor4View::operator()(), Tensor3View::operator()(), ConstTensor3View::operator()(), MatrixView::operator()(), ConstMatrixView::operator()(), Tensor5View::operator()(), ConstTensor5View::operator()(), VectorView::operator[](), ConstVectorView::operator[](), Range(), Tensor4::resize(), Tensor7::resize(), Vector::resize(), Tensor3::resize(), Matrix::resize(), Tensor5::resize(), and Tensor6::resize().
|
private |
The stride.
Can be positive or negative.
Definition at line 209 of file matpackI.h.
Referenced by VectorView::begin(), MatrixView::begin(), Tensor3View::begin(), Tensor4View::begin(), Tensor5View::begin(), Tensor6View::begin(), Tensor7View::begin(), ConstVectorView::begin(), ConstMatrixView::begin(), ConstTensor3View::begin(), ConstTensor4View::begin(), ConstTensor5View::begin(), ConstTensor6View::begin(), ConstTensor7View::begin(), VectorView::end(), MatrixView::end(), Tensor3View::end(), Tensor4View::end(), Tensor5View::end(), Tensor6View::end(), Tensor7View::end(), ConstVectorView::end(), ConstMatrixView::end(), ConstTensor3View::end(), ConstTensor4View::end(), ConstTensor5View::end(), ConstTensor6View::end(), ConstTensor7View::end(), Tensor3View::get_c_array(), Tensor4View::get_c_array(), Tensor5View::get_c_array(), VectorView::get_c_array(), MatrixView::get_c_array(), get_stride(), mult(), Tensor4View::operator()(), ConstTensor4View::operator()(), Tensor3View::operator()(), ConstTensor3View::operator()(), MatrixView::operator()(), ConstMatrixView::operator()(), Tensor5View::operator()(), ConstTensor5View::operator()(), VectorView::operator[](), ConstVectorView::operator[](), Range(), Tensor4::resize(), Tensor7::resize(), Vector::resize(), Tensor3::resize(), Matrix::resize(), Tensor5::resize(), and Tensor6::resize().