ARTS
2.3.626
|
The complex range class. More...
#include <complex.h>
Public Member Functions | |
ComplexRange (Index start, Index extent, Index stride=1) | |
ComplexRange (Index start, Joker j, Index stride=1) | |
Constructor with joker extent. More... | |
ComplexRange (Joker j, Index stride=1) | |
Constructor with just a joker. More... | |
ComplexRange (Index max_size, const ComplexRange &r) | |
Constructor which converts a range with joker to an explicit range. More... | |
ComplexRange (const ComplexRange &p, const ComplexRange &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 | ConstComplexVectorView |
class | ComplexVectorView |
class | ComplexVector |
class | ConstComplexMatrixView |
class | ComplexMatrixView |
class | ComplexMatrix |
class | ComplexIterator2D |
class | ConstComplexIterator2D |
The complex 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 97 of file complex.cc.
Constructor with joker extent.
Depending on the sign of stride, this means "to the end", or "to the beginning".
Definition at line 113 of file complex.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 123 of file complex.cc.
ComplexRange::ComplexRange | ( | Index | max_size, |
const ComplexRange & | r | ||
) |
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 134 of file complex.cc.
ComplexRange::ComplexRange | ( | const ComplexRange & | p, |
const ComplexRange & | n | ||
) |
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 172 of file complex.cc.
|
inline |
Returns the extent of the range.
Definition at line 105 of file complex.h.
References mextent.
Referenced by xsec_species2().
|
inline |
Returns the start index of the range.
Definition at line 103 of file complex.h.
References mstart.
Referenced by MapToEigen(), MapToEigenCol(), and xsec_species2().
|
inline |
Returns the stride of the range.
Definition at line 107 of file complex.h.
References mstride.
Referenced by MapToEigen(), and MapToEigenCol().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
The number of elements.
-1 means extent to the end of the vector.
Definition at line 114 of file complex.h.
Referenced by ComplexRange(), ConstComplexMatrixView::diagonal(), ConstComplexVectorView::end(), ComplexVectorView::end(), ConstComplexMatrixView::end(), ComplexMatrixView::end(), ComplexMatrixView::get_c_array(), get_extent(), ConstComplexMatrixView::ncols(), ConstComplexVectorView::nelem(), ConstComplexMatrixView::nrows(), ConstComplexMatrixView::operator()(), ComplexMatrixView::operator()(), ComplexVectorView::operator=(), ComplexMatrixView::operator=(), ConstComplexVectorView::operator[](), ComplexVectorView::operator[](), ComplexVector::resize(), and ComplexMatrix::resize().
|
private |
The start index.
Definition at line 111 of file complex.h.
Referenced by ConstComplexVectorView::begin(), ComplexVectorView::begin(), ConstComplexMatrixView::begin(), ComplexMatrixView::begin(), ComplexRange(), ConstComplexMatrixView::diagonal(), ConstComplexVectorView::end(), ComplexVectorView::end(), ConstComplexMatrixView::end(), ComplexMatrixView::end(), ConstComplexVectorView::get(), ComplexVectorView::get(), ConstComplexMatrixView::get(), ComplexMatrixView::get(), ComplexVectorView::get_c_array(), ComplexMatrixView::get_c_array(), get_start(), ComplexIterator2D::operator!=(), ConstComplexIterator2D::operator!=(), ConstComplexMatrixView::operator()(), ComplexMatrixView::operator()(), ComplexVector::resize(), and ComplexMatrix::resize().
|
private |
The stride.
Can be positive or negative.
Definition at line 116 of file complex.h.
Referenced by ConstComplexVectorView::begin(), ComplexVectorView::begin(), ConstComplexMatrixView::begin(), ComplexMatrixView::begin(), ComplexRange(), ConstComplexMatrixView::diagonal(), ConstComplexVectorView::end(), ComplexVectorView::end(), ConstComplexMatrixView::end(), ComplexMatrixView::end(), ConstComplexVectorView::get(), ComplexVectorView::get(), ConstComplexMatrixView::get(), ComplexMatrixView::get(), ComplexVectorView::get_c_array(), ComplexMatrixView::get_c_array(), get_stride(), ConstComplexMatrixView::operator()(), ComplexMatrixView::operator()(), ComplexVector::resize(), and ComplexMatrix::resize().