ARTS  2.3.626
ComplexRange Class Reference

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
 

Detailed Description

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 83 of file complex.h.

Constructor & Destructor Documentation

ComplexRange::ComplexRange ( Index  start,
Index  extent,
Index  stride = 1 
)

Definition at line 97 of file complex.cc.

References mextent, and mstart.

ComplexRange::ComplexRange ( Index  start,
Joker  j,
Index  stride = 1 
)

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.

ComplexRange::ComplexRange ( Joker  j,
Index  stride = 1 
)

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.

Parameters
max_sizeThe maximum allowed size of the vector.
rThe new range, with joker.

Definition at line 134 of file complex.cc.

References mextent, mstart, and mstride.

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.

Parameters
pPrevious range.
nNew range.

Definition at line 172 of file complex.cc.

References mextent, mstart, and mstride.

Member Function Documentation

Index ComplexRange::get_extent ( ) const
inline

Returns the extent of the range.

Definition at line 105 of file complex.h.

References mextent.

Referenced by xsec_species2().

Index ComplexRange::get_start ( ) const
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().

Index ComplexRange::get_stride ( ) const
inline

Returns the stride of the range.

Definition at line 107 of file complex.h.

References mstride.

Referenced by MapToEigen(), and MapToEigenCol().

Friends And Related Function Documentation

friend class ComplexIterator2D
friend

Definition at line 99 of file complex.h.

friend class ComplexMatrix
friend

Definition at line 98 of file complex.h.

friend class ComplexMatrixView
friend

Definition at line 97 of file complex.h.

friend class ComplexVector
friend

Definition at line 95 of file complex.h.

friend class ComplexVectorView
friend

Definition at line 94 of file complex.h.

friend class ConstComplexIterator2D
friend

Definition at line 100 of file complex.h.

friend class ConstComplexMatrixView
friend

Definition at line 96 of file complex.h.

friend class ConstComplexVectorView
friend

Definition at line 93 of file complex.h.

Member Data Documentation


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