SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWMathArray< T > Class Template Reference

A templatized arbitrary dimension array class. More...

#include <rw/math/mtharray.h>

Inherits RWArrayView.

Public Types

typedef RWMathArrayConstIterator< T > const_iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef RWMathArrayIterator< T > iterator
 
typedef rw_numeric_traits< T >::mathFunType mathFunType
 
typedef rw_numeric_traits< T >::mathFunType2 mathFunType2
 
typedef rw_numeric_traits< T >::norm_type norm_type
 
typedef rw_numeric_traits< T >::promote_type promote_type
 
typedef std::reverse_iterator< iteratorreverse_iterator
 

Public Member Functions

 RWMathArray ()
 
 RWMathArray (const char *s)
 
 RWMathArray (const RWGenMat< T > &)
 
 RWMathArray (const RWIntVec &n, RWUninitialized, Storage storage=COLUMN_MAJOR)
 
 RWMathArray (const RWIntVec &vec, RWTRand< RWRandGenerator > &r, Storage s=COLUMN_MAJOR)
 
 RWMathArray (const RWIntVec &vec, T val)
 
 RWMathArray (const RWMathArray< double > &re, const RWMathArray< double > &im)
 
 RWMathArray (const RWMathArray< T > &a)
 
 RWMathArray (const RWMathVec< T > &)
 
 RWMathArray (const RWMathVec< T > &vec, const RWIntVec &n)
 
 RWMathArray (const RWMathVec< T > &vec, size_t m, size_t n, size_t o)
 
 RWMathArray (const RWMathVec< T > &vec, size_t m, size_t n, size_t o, size_t p)
 
 RWMathArray (const T *dat, const RWIntVec &n)
 
 RWMathArray (const T *dat, size_t m, size_t n, size_t o)
 
 RWMathArray (const T *dat, size_t m, size_t n, size_t o, size_t p)
 
 RWMathArray (size_t m, size_t n, size_t o, RWTRand< RWRandGenerator > &r)
 
 RWMathArray (size_t m, size_t n, size_t o, RWUninitialized)
 
 RWMathArray (size_t m, size_t n, size_t o, size_t p, RWTRand< RWRandGenerator > &r)
 
 RWMathArray (size_t m, size_t n, size_t o, size_t p, RWUninitialized)
 
 RWMathArray (size_t m, size_t n, size_t o, size_t p, T val)
 
 RWMathArray (size_t m, size_t n, size_t o, T val)
 
RWMathArray< T > apply (mathFunType f) const
 
RWMathArray< norm_typeapply2 (mathFunType2 f) const
 
iterator begin ()
 
const_iterator begin () const
 
size_t binaryStoreSize () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
RWMathArray< T > copy () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
T * data ()
 
const T * data () const
 
RWMathArray< T > deepCopy () const
 
void deepenShallowCopy ()
 
size_t dimension () const
 
iterator end ()
 
const_iterator end () const
 
RWIntVec length () const
 
int length (int i) const
 
 operator RWMathArray< promote_type > ()
 
bool operator!= (const RWMathArray< T > &v) const
 
T & operator() (const RWIntVec &i)
 
operator() (const RWIntVec &i) const
 
RWMathArray< T > operator() (const RWSlice &i, const RWSlice &j, const RWSlice &k)
 
const RWMathArray< T > operator() (const RWSlice &i, const RWSlice &j, const RWSlice &k) const
 
RWMathArray< T > operator() (const RWSlice &i, const RWSlice &j, const RWSlice &k, const RWSlice &l)
 
const RWMathArray< T > operator() (const RWSlice &i, const RWSlice &j, const RWSlice &k, const RWSlice &l) const
 
RWMathArray< T > operator() (const RWSlice &i, const RWSlice &j, const RWSlice &k, int l)
 
const RWMathArray< T > operator() (const RWSlice &i, const RWSlice &j, const RWSlice &k, int l) const
 
RWGenMat< T > operator() (const RWSlice &i, const RWSlice &j, int k)
 
const RWGenMat< T > operator() (const RWSlice &i, const RWSlice &j, int k) const
 
RWMathArray< T > operator() (const RWSlice &i, const RWSlice &j, int k, const RWSlice &l)
 
const RWMathArray< T > operator() (const RWSlice &i, const RWSlice &j, int k, const RWSlice &l) const
 
RWGenMat< T > operator() (const RWSlice &i, const RWSlice &j, int k, int l)
 
const RWGenMat< T > operator() (const RWSlice &i, const RWSlice &j, int k, int l) const
 
RWGenMat< T > operator() (const RWSlice &i, int j, const RWSlice &k)
 
const RWGenMat< T > operator() (const RWSlice &i, int j, const RWSlice &k) const
 
RWMathArray< T > operator() (const RWSlice &i, int j, const RWSlice &k, const RWSlice &l)
 
const RWMathArray< T > operator() (const RWSlice &i, int j, const RWSlice &k, const RWSlice &l) const
 
RWGenMat< T > operator() (const RWSlice &i, int j, const RWSlice &k, int l)
 
const RWGenMat< T > operator() (const RWSlice &i, int j, const RWSlice &k, int l) const
 
RWMathVec< T > operator() (const RWSlice &i, int j, int k)
 
const RWMathVec< T > operator() (const RWSlice &i, int j, int k) const
 
RWGenMat< T > operator() (const RWSlice &i, int j, int k, const RWSlice &l)
 
const RWGenMat< T > operator() (const RWSlice &i, int j, int k, const RWSlice &l) const
 
RWMathVec< T > operator() (const RWSlice &i, int j, int k, int l)
 
const RWMathVec< T > operator() (const RWSlice &i, int j, int k, int l) const
 
RWGenMat< T > operator() (int i, const RWSlice &j, const RWSlice &k)
 
const RWGenMat< T > operator() (int i, const RWSlice &j, const RWSlice &k) const
 
RWMathArray< T > operator() (int i, const RWSlice &j, const RWSlice &k, const RWSlice &l)
 
const RWMathArray< T > operator() (int i, const RWSlice &j, const RWSlice &k, const RWSlice &l) const
 
RWGenMat< T > operator() (int i, const RWSlice &j, const RWSlice &k, int l)
 
const RWGenMat< T > operator() (int i, const RWSlice &j, const RWSlice &k, int l) const
 
RWMathVec< T > operator() (int i, const RWSlice &j, int k)
 
const RWMathVec< T > operator() (int i, const RWSlice &j, int k) const
 
RWGenMat< T > operator() (int i, const RWSlice &j, int k, const RWSlice &l)
 
const RWGenMat< T > operator() (int i, const RWSlice &j, int k, const RWSlice &l) const
 
RWMathVec< T > operator() (int i, const RWSlice &j, int k, int l)
 
const RWMathVec< T > operator() (int i, const RWSlice &j, int k, int l) const
 
RWMathVec< T > operator() (int i, int j, const RWSlice &k)
 
const RWMathVec< T > operator() (int i, int j, const RWSlice &k) const
 
RWGenMat< T > operator() (int i, int j, const RWSlice &k, const RWSlice &l)
 
const RWGenMat< T > operator() (int i, int j, const RWSlice &k, const RWSlice &l) const
 
RWMathVec< T > operator() (int i, int j, const RWSlice &k, int l)
 
const RWMathVec< T > operator() (int i, int j, const RWSlice &k, int l) const
 
T & operator() (int i, int j, int k)
 
operator() (int i, int j, int k) const
 
RWMathVec< T > operator() (int i, int j, int k, const RWSlice &l)
 
const RWMathVec< T > operator() (int i, int j, int k, const RWSlice &l) const
 
T & operator() (int i, int j, int k, int l)
 
operator() (int i, int j, int k, int l) const
 
RWMathArray< T > & operator*= (const RWMathArray< T > &v)
 
RWMathArray< T > & operator*= (const T &s)
 
RWMathArray< T > & operator++ ()
 
void operator++ (int)
 
RWMathArray< T > & operator+= (const RWMathArray< T > &v)
 
RWMathArray< T > & operator+= (const T &s)
 
RWMathArray< T > & operator-- ()
 
void operator-- (int)
 
RWMathArray< T > & operator-= (const RWMathArray< T > &v)
 
RWMathArray< T > & operator-= (const T &s)
 
RWMathArray< T > & operator/= (const RWMathArray< T > &v)
 
RWMathArray< T > & operator/= (const T &s)
 
RWMathArray< T > & operator= (const RWMathArray< T > &v)
 
RWMathArray< T > & operator= (const T &s)
 
bool operator== (const RWMathArray< T > &v) const
 
T & operator[] (const RWIntVec &i)
 
operator[] (const RWIntVec &i) const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
RWMathArray< T > & reference (const RWMathArray< T > &v)
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
void reshape (const RWIntVec &v, Storage storage=COLUMN_MAJOR)
 
void reshape (size_t m, size_t n, size_t o, size_t p, Storage storage=COLUMN_MAJOR)
 
void reshape (size_t m, size_t n, size_t o, Storage storage=COLUMN_MAJOR)
 
void resize (const RWIntVec &v, Storage storage=COLUMN_MAJOR)
 
void resize (size_t m, size_t n, size_t o, size_t p, Storage storage=COLUMN_MAJOR)
 
void resize (size_t m, size_t n, size_t o, Storage storage=COLUMN_MAJOR)
 
void restoreFrom (RWFile &)
 
void restoreFrom (RWvistream &)
 
void saveOn (RWFile &) const
 
void saveOn (RWvostream &) const
 
RWMathArray< T > slice (const RWIntVec &start, const RWIntVec &lgt, const RWGenMat< int > &strider) const
 

Friends

RWMathArray< double > imag (const RWMathArray< DComplex > &v)
 
RWMathArray< double > real (const RWMathArray< DComplex > &v)
 

Related Symbols

(Note that these are not member symbols.)

RWMathArray< double > abs (const RWMathArray< DComplex > &)
 
RWMathArray< double > abs (const RWMathArray< double > &)
 
RWMathArray< float > abs (const RWMathArray< float > &)
 
RWMathArray< int > abs (const RWMathArray< int > &)
 
RWMathArray< signed char > abs (const RWMathArray< signed char > &)
 
template<class T >
RWMathArray< T > acos (const RWMathArray< T > &x)
 
RWMathArray< double > arg (const RWMathArray< DComplex > &v)
 
template<class T >
RWMathArray< T > asin (const RWMathArray< T > &x)
 
template<class T >
RWMathArray< T > atan (const RWMathArray< T > &x)
 
template<class T >
RWMathArray< T > atan2 (const RWMathArray< T > &x, const RWMathArray< T > &y)
 
template<class T >
RWMathArray< T > ceil (const RWMathArray< T > &x)
 
RWMathArray< DComplexconj (const RWMathArray< DComplex > &v)
 
template<class T >
RWMathArray< T > cos (const RWMathArray< T > &x)
 
template<class T >
RWMathArray< T > cosh (const RWMathArray< T > &x)
 
template<class T >
RWMathArray< T > exp (const RWMathArray< T > &x)
 
template<class T >
RWMathArray< T > floor (const RWMathArray< T > &x)
 
double frobNorm (const RWMathArray< DComplex > &v)
 
double frobNorm (const RWMathArray< double > &v)
 
float frobNorm (const RWMathArray< float > &v)
 
template<class T >
RWMathArray< T > log (const RWMathArray< T > &x)
 
template<class T >
RWMathArray< T > log10 (const RWMathArray< T > &x)
 
template<class T >
RWIntVec maxIndex (const RWMathArray< T > &)
 
double maxNorm (const RWMathArray< DComplex > &v)
 
double maxNorm (const RWMathArray< double > &v)
 
float maxNorm (const RWMathArray< float > &v)
 
template<class T >
maxValue (const RWMathArray< T > &)
 
template<class T >
mean (const RWMathArray< T > &V)
 
template<class T >
RWIntVec minIndex (const RWMathArray< T > &)
 
template<class T >
minValue (const RWMathArray< T > &)
 
RWMathArray< double > norm (const RWMathArray< DComplex > &)
 
template<class T >
RWMathArray< T > operator* (const RWMathArray< T > &u, const RWMathArray< T > &v)
 
template<class T >
RWMathArray< T > operator* (const RWMathArray< T > &u, const T &s)
 
template<class T >
RWMathArray< T > operator* (const T &s, const RWMathArray< T > &v)
 
template<class T >
RWMathArray< T > operator+ (const RWMathArray< T > &u)
 
template<class T >
RWMathArray< T > operator+ (const RWMathArray< T > &u, const RWMathArray< T > &v)
 
template<class T >
RWMathArray< T > operator+ (const RWMathArray< T > &u, const T &s)
 
template<class T >
RWMathArray< T > operator+ (const T &s, const RWMathArray< T > &v)
 
template<class T >
RWMathArray< T > operator- (const RWMathArray< T > &u)
 
template<class T >
RWMathArray< T > operator- (const RWMathArray< T > &u, const RWMathArray< T > &v)
 
template<class T >
RWMathArray< T > operator- (const RWMathArray< T > &u, const T &s)
 
template<class T >
RWMathArray< T > operator- (const T &s, const RWMathArray< T > &v)
 
template<class T >
RWMathArray< T > operator/ (const RWMathArray< T > &u, const RWMathArray< T > &v)
 
template<class T >
RWMathArray< T > operator/ (const RWMathArray< T > &u, const T &s)
 
template<class T >
RWMathArray< T > operator/ (const T &s, const RWMathArray< T > &v)
 
template<class T >
RWMathArray< T > pow (const RWMathArray< T > &x, const RWMathArray< T > &y)
 
template<class T >
RWMathArray< T > pow (const RWMathArray< T > &x, T y)
 
template<class T >
RWMathArray< T > pow (T x, const RWMathArray< T > &y)
 
template<class T >
RWMathArray< T > sin (const RWMathArray< T > &V)
 
template<class T >
RWMathArray< T > sinh (const RWMathArray< T > &V)
 
template<class T >
RWMathArray< T > sqrt (const RWMathArray< T > &V)
 
template<class T >
RWMathArray< T > tan (const RWMathArray< T > &x)
 
template<class T >
RWMathArray< T > tanh (const RWMathArray< T > &x)
 
RWMathArray< signed char > toChar (const RWMathArray< int > &v)
 
RWMathArray< float > toFloat (const RWMathArray< double > &v)
 
template<class T >
RWGenMat< T > toGenMat (const RWMathArray< T > &)
 
RWMathArray< int > toInt (const RWMathArray< double > &v)
 
RWMathArray< int > toInt (const RWMathArray< float > &v)
 
template<class T >
toScalar (const RWMathArray< T > &)
 
template<class T >
RWMathVec< T > toVec (const RWMathArray< T > &)
 

Detailed Description

template<class T>
class RWMathArray< T >

Class RWMathArray is a templatized arbitrary dimension array class.

Synopsis
#include <rw/math/mtharray.h>
A templatized arbitrary dimension array class.
Definition mtharray.h:919
Example
#include <rw/math/mtharray.h>
int main() {
RWMathArray<DComplex> A(3, 3, 3, DComplex(3, 0));
RWMathArray<DComplex> B(5, 5, 5, 5, reUninitialized);
// Set a plane of data to 5 + 2i
A(RWAll, 0, RWAll) = DComplex(5, 2);
}
std::complex< double > DComplex
Definition dcomplex.h:53
See also
RWConvertMathArray

Member Typedef Documentation

◆ const_iterator

template<class T >
typedef RWMathArrayConstIterator<T> RWMathArray< T >::const_iterator

A type that provides a const random-access iterator over the elements in the container.

◆ const_reverse_iterator

template<class T >
typedef std::reverse_iterator<const_iterator> RWMathArray< T >::const_reverse_iterator

A type that provides a const random-access, reverse-order iterator over the elements in the container.

◆ iterator

template<class T >
typedef RWMathArrayIterator<T> RWMathArray< T >::iterator

A type that provides a random-access iterator over the elements in the container.

◆ mathFunType

template<class T >
typedef rw_numeric_traits<T>::mathFunType RWMathArray< T >::mathFunType

Typedef for the function pointer used in the method apply(). For more information, see rw_numeric_traits<T>::mathFunType.

◆ mathFunType2

template<class T >
typedef rw_numeric_traits<T>::mathFunType2 RWMathArray< T >::mathFunType2

Typedef for the function pointer used in the method apply2(). For more information, see rw_numeric_traits<T>::mathFunType2.

◆ norm_type

template<class T >
typedef rw_numeric_traits<T>::norm_type RWMathArray< T >::norm_type

Typedef for the usual return type of numerical norm-like functions. For more information, see rw_numeric_traits<T>::norm_type.

◆ promote_type

template<class T >
typedef rw_numeric_traits<T>::promote_type RWMathArray< T >::promote_type

Typedef for the promotion type. For more information, see rw_numeric_traits<T>::promote_type.

◆ reverse_iterator

template<class T >
typedef std::reverse_iterator<iterator> RWMathArray< T >::reverse_iterator

A type that provides a random-access, reverse-order iterator over the elements in the container.

Constructor & Destructor Documentation

◆ RWMathArray() [1/21]

template<class T >
RWMathArray< T >::RWMathArray ( )

Constructs a 0-dimensional array, useful for declaring vectors of arrays. Like any other array, this array can subsequently be reshaped or resized (see member functions reshape() and resize()). Note that since this is a 0-dimensional (not 0 length) array, and since by definition a 0-dimensional array is a scalar, the array has one element of data.

◆ RWMathArray() [2/21]

template<class T >
RWMathArray< T >::RWMathArray ( const RWIntVec & n,
RWUninitialized ,
Storage storage = COLUMN_MAJOR )
inline

Constructs an uninitialized array with a specified size. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions. The RWUninitialized type is an enumeration type with only one value, rwUninitialized. The rwUninitialized argument is used to distinguish the last dimension size from an initial value.

◆ RWMathArray() [3/21]

template<class T >
RWMathArray< T >::RWMathArray ( size_t m,
size_t n,
size_t o,
RWUninitialized  )

Constructs an uninitialized array with a specified size. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions. The RWUninitialized type is an enumeration type with only one value, rwUninitialized. The rwUninitialized argument is used to distinguish the last dimension size from an initial value.

◆ RWMathArray() [4/21]

template<class T >
RWMathArray< T >::RWMathArray ( size_t m,
size_t n,
size_t o,
size_t p,
RWUninitialized  )

Constructs an uninitialized array with a specified size. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions. The RWUninitialized type is an enumeration type with only one value, rwUninitialized. The rwUninitialized argument is used to distinguish the last dimension size from an initial value.

◆ RWMathArray() [5/21]

template<class T >
RWMathArray< T >::RWMathArray ( const RWIntVec & vec,
RWTRand< RWRandGenerator > & r,
Storage s = COLUMN_MAJOR )

Constructs an array with a specified size initialized with random numbers generated by r. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions.

◆ RWMathArray() [6/21]

template<class T >
RWMathArray< T >::RWMathArray ( size_t m,
size_t n,
size_t o,
RWTRand< RWRandGenerator > & r )

Constructs an array with a specified size initialized with random numbers generated by r. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions.

◆ RWMathArray() [7/21]

template<class T >
RWMathArray< T >::RWMathArray ( size_t m,
size_t n,
size_t o,
size_t p,
RWTRand< RWRandGenerator > & r )

Constructs an array with a specified size initialized with random numbers generated by r. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions.

◆ RWMathArray() [8/21]

template<class T >
RWMathArray< T >::RWMathArray ( const RWIntVec & vec,
T val )

Constructs an array with a specified size. Each element in the array is initialized to val. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions.

◆ RWMathArray() [9/21]

template<class T >
RWMathArray< T >::RWMathArray ( size_t m,
size_t n,
size_t o,
T val )

Constructs an array with a specified size. Each element in the array is initialized to val. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions.

◆ RWMathArray() [10/21]

template<class T >
RWMathArray< T >::RWMathArray ( size_t m,
size_t n,
size_t o,
size_t p,
T val )

Constructs an array with a specified size. Each element in the array is initialized to val. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions.

◆ RWMathArray() [11/21]

template<class T >
RWMathArray< T >::RWMathArray ( const char * s)

Constructs an array from the null terminated character string s. The format of the character string is the same as that expected by the global operator operator>> described in this entry.

◆ RWMathArray() [12/21]

template<class T >
RWMathArray< T >::RWMathArray ( const RWMathArray< T > & a)
inline

Copy constructor. The new array and the old array both view the same data.

◆ RWMathArray() [13/21]

template<class T >
RWMathArray< T >::RWMathArray ( const T * dat,
const RWIntVec & n )

Constructs an array with a specified size using the data in the vector dat as initial data. A copy of dat is made. The vector dat must have at least as many elements as the array. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions.

◆ RWMathArray() [14/21]

template<class T >
RWMathArray< T >::RWMathArray ( const T * dat,
size_t m,
size_t n,
size_t o )

Constructs an array with a specified size using the data in the vector dat as initial data. A copy of dat is made. The vector dat must have at least as many elements as the array. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions.

◆ RWMathArray() [15/21]

template<class T >
RWMathArray< T >::RWMathArray ( const T * dat,
size_t m,
size_t n,
size_t o,
size_t p )

Constructs an array with a specified size using the data in the vector dat as initial data. A copy of dat is made. The vector dat must have at least as many elements as the array. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions.

◆ RWMathArray() [16/21]

template<class T >
RWMathArray< T >::RWMathArray ( const RWMathVec< T > & vec,
const RWIntVec & n )

Constructs an array using the data in the vector vec. The array is a new view of the same data as vec, so no copy of the data is made. The vector vec must have the same number of elements as the array. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions.

◆ RWMathArray() [17/21]

template<class T >
RWMathArray< T >::RWMathArray ( const RWMathVec< T > & vec,
size_t m,
size_t n,
size_t o )

Constructs an array using the data in the vector vec. The array is a new view of the same data as vec, so no copy of the data is made. The vector vec must have the same number of elements as the array. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions.

◆ RWMathArray() [18/21]

template<class T >
RWMathArray< T >::RWMathArray ( const RWMathVec< T > & vec,
size_t m,
size_t n,
size_t o,
size_t p )

Constructs an array using the data in the vector vec. The array is a new view of the same data as vec, so no copy of the data is made. The vector vec must have the same number of elements as the array. The constructor taking an integer vector is useful for constructing arrays with more than four dimensions.

◆ RWMathArray() [19/21]

template<class T >
RWMathArray< T >::RWMathArray ( const RWMathVec< T > & )

Constructs a 1-dimensional or 2-dimensional array from a vector or matrix. The resulting array is an alternate view of the same data. This constructor is most often used implicitly by the compiler to pass vectors or matrices to subroutines written to operate on arrays of arbitrary dimension. This allows you to write one subroutine suitable for vectors, matrices, or arrays.

◆ RWMathArray() [20/21]

template<class T >
RWMathArray< T >::RWMathArray ( const RWGenMat< T > & )

Constructs a 1-dimensional or 2-dimensional array from a vector or matrix. The resulting array is an alternate view of the same data. This constructor is most often used implicitly by the compiler to pass vectors or matrices to subroutines written to operate on arrays of arbitrary dimension. This allows you to write one subroutine suitable for vectors, matrices, or arrays.

◆ RWMathArray() [21/21]

template<class T >
RWMathArray< T >::RWMathArray ( const RWMathArray< double > & re,
const RWMathArray< double > & im )

Constructs a complex array from the double precision arrays re and im, with the real part of the array equal to re and the imaginary part equal to im. A new copy of the data is made.

Member Function Documentation

◆ apply()

template<class T >
RWMathArray< T > RWMathArray< T >::apply ( mathFunType f) const
inline

Returns the result of applying the passed function to every element in the array. A function of type RWMathArray<T>::mathFunType takes and returns a T.

◆ apply2()

template<class T >
RWMathArray< norm_type > RWMathArray< T >::apply2 ( mathFunType2 f) const

Returns the result of applying the passed function to every element in the array. The function of type RWMathArray<T>::mathFunType2 takes a T and returns an RWMathArray<T>::norm_type. See class rw_numeric_traits for a description of RWMathArray<T>::norm_type.

◆ begin() [1/2]

template<class T >
iterator RWMathArray< T >::begin ( )
inline

Returns an iterator pointing to the first element of self.

◆ begin() [2/2]

template<class T >
const_iterator RWMathArray< T >::begin ( ) const
inline

Returns an iterator pointing to the first element of self.

◆ binaryStoreSize()

template<class T >
size_t RWMathArray< T >::binaryStoreSize ( ) const

Returns the number of bytes required to store the array to an RWFile using member function saveOn(RWFile&).

◆ cbegin()

template<class T >
const_iterator RWMathArray< T >::cbegin ( ) const
inline

Returns an iterator pointing to the first element of self.

◆ cend()

template<class T >
const_iterator RWMathArray< T >::cend ( ) const
inline

Returns an iterator pointing to one element past the last element of self.

◆ copy()

template<class T >
RWMathArray< T > RWMathArray< T >::copy ( ) const

Returns a copy with distinct instance variables.

◆ crbegin()

template<class T >
const_reverse_iterator RWMathArray< T >::crbegin ( ) const
inline

Returns an iterator pointing to the last element of self.

◆ crend()

template<class T >
const_reverse_iterator RWMathArray< T >::crend ( ) const
inline

Returns an iterator pointing to one element past the first element of self.

◆ data() [1/2]

template<class T >
T * RWMathArray< T >::data ( )
inline

Returns a pointer to the start of an array's data. Should be used with care, as this accesses the array's data directly.

◆ data() [2/2]

template<class T >
const T * RWMathArray< T >::data ( ) const
inline

Returns a pointer to the start of an array's data. Should be used with care, as this accesses the array's data directly.

◆ deepCopy()

template<class T >
RWMathArray< T > RWMathArray< T >::deepCopy ( ) const

Alias for copy().

◆ deepenShallowCopy()

template<class T >
void RWMathArray< T >::deepenShallowCopy ( )

When invoked for an array, guarantees that there is only one reference to that object and that its data are in contiguous memory.

◆ dimension()

template<class T >
size_t RWMathArray< T >::dimension ( ) const
inline

Returns the number of dimensions of the array.

◆ end() [1/2]

template<class T >
iterator RWMathArray< T >::end ( )
inline

Returns an iterator pointing to one element past the last element of self.

◆ end() [2/2]

template<class T >
const_iterator RWMathArray< T >::end ( ) const
inline

Returns an iterator pointing to one element past the last element of self.

◆ length() [1/2]

template<class T >
RWIntVec RWMathArray< T >::length ( ) const
inline

Returns the number of entries in a dimension of the array, returning all the dimension lengths at once.

◆ length() [2/2]

template<class T >
int RWMathArray< T >::length ( int i) const
inline

Returns the size of the indicated dimension.

◆ operator RWMathArray< promote_type >()

template<class T >
RWMathArray< T >::operator RWMathArray< promote_type > ( )
inline

Implicit conversion operator to rw_numeric_traits::promote_type.

◆ operator!=()

template<class T >
bool RWMathArray< T >::operator!= ( const RWMathArray< T > & v) const

Returns true if self and the argument are equivalent (or not equivalent). To be equivalent, they must have the same number of rows as well as columns, and each element in self must equal the corresponding element in the argument.

◆ operator()() [1/50]

template<class T >
T & RWMathArray< T >::operator() ( const RWIntVec & i)
inline

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a reference to the element indexed by i.

◆ operator()() [2/50]

template<class T >
T RWMathArray< T >::operator() ( const RWIntVec & i) const
inline

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns the element indexed by i.

◆ operator()() [3/50]

template<class T >
RWMathArray< T > RWMathArray< T >::operator() ( const RWSlice & i,
const RWSlice & j,
const RWSlice & k )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWMathArray that contains the elements at (i th, j th, k th) position of the array. The RWMathArray being returned is a new view of the same data as the array being subscripted.

◆ operator()() [4/50]

template<class T >
const RWMathArray< T > RWMathArray< T >::operator() ( const RWSlice & i,
const RWSlice & j,
const RWSlice & k ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWMathArray that contains the elements at (i th, j th, k th) position of the array. The RWMathArray being returned is a new view of the same data as the array being subscripted.

◆ operator()() [5/50]

template<class T >
RWMathArray< T > RWMathArray< T >::operator() ( const RWSlice & i,
const RWSlice & j,
const RWSlice & k,
const RWSlice & l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWMathArray that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathArray being returned is a new view of the same data as the array being subscripted.

◆ operator()() [6/50]

template<class T >
const RWMathArray< T > RWMathArray< T >::operator() ( const RWSlice & i,
const RWSlice & j,
const RWSlice & k,
const RWSlice & l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWMathArray that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathArray being returned is a new view of the same data as the array being subscripted.

◆ operator()() [7/50]

template<class T >
RWMathArray< T > RWMathArray< T >::operator() ( const RWSlice & i,
const RWSlice & j,
const RWSlice & k,
int l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWMathArray that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathArray being returned is a new view of the same data as the array being subscripted.

◆ operator()() [8/50]

template<class T >
const RWMathArray< T > RWMathArray< T >::operator() ( const RWSlice & i,
const RWSlice & j,
const RWSlice & k,
int l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWMathArray that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathArray being returned is a new view of the same data as the array being subscripted.

◆ operator()() [9/50]

template<class T >
RWGenMat< T > RWMathArray< T >::operator() ( const RWSlice & i,
const RWSlice & j,
int k )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWGenMat that contains the elements at (i th, j th, k th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [10/50]

template<class T >
const RWGenMat< T > RWMathArray< T >::operator() ( const RWSlice & i,
const RWSlice & j,
int k ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWGenMat that contains the elements at (i th, j th, k th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [11/50]

template<class T >
RWMathArray< T > RWMathArray< T >::operator() ( const RWSlice & i,
const RWSlice & j,
int k,
const RWSlice & l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWMathArray that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathArray being returned is a new view of the same data as the array being subscripted.

◆ operator()() [12/50]

template<class T >
const RWMathArray< T > RWMathArray< T >::operator() ( const RWSlice & i,
const RWSlice & j,
int k,
const RWSlice & l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWMathArray that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathArray being returned is a new view of the same data as the array being subscripted.

◆ operator()() [13/50]

template<class T >
RWGenMat< T > RWMathArray< T >::operator() ( const RWSlice & i,
const RWSlice & j,
int k,
int l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWGenMat that contains the elements at (i th, j th, k th, l th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [14/50]

template<class T >
const RWGenMat< T > RWMathArray< T >::operator() ( const RWSlice & i,
const RWSlice & j,
int k,
int l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWGenMat that contains the elements at (i th, j th, k th, l th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [15/50]

template<class T >
RWGenMat< T > RWMathArray< T >::operator() ( const RWSlice & i,
int j,
const RWSlice & k )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWGenMat that contains the elements at (i th, j th, k th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [16/50]

template<class T >
const RWGenMat< T > RWMathArray< T >::operator() ( const RWSlice & i,
int j,
const RWSlice & k ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWGenMat that contains the elements at (i th, j th, k th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [17/50]

template<class T >
RWMathArray< T > RWMathArray< T >::operator() ( const RWSlice & i,
int j,
const RWSlice & k,
const RWSlice & l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWMathArray that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathArray being returned is a new view of the same data as the array being subscripted.

◆ operator()() [18/50]

template<class T >
const RWMathArray< T > RWMathArray< T >::operator() ( const RWSlice & i,
int j,
const RWSlice & k,
const RWSlice & l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWMathArray that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathArray being returned is a new view of the same data as the array being subscripted.

◆ operator()() [19/50]

template<class T >
RWGenMat< T > RWMathArray< T >::operator() ( const RWSlice & i,
int j,
const RWSlice & k,
int l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWGenMat that contains the elements at (i th, j th, k th, l th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [20/50]

template<class T >
const RWGenMat< T > RWMathArray< T >::operator() ( const RWSlice & i,
int j,
const RWSlice & k,
int l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWGenMat that contains the elements at (i th, j th, k th, l th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [21/50]

template<class T >
RWMathVec< T > RWMathArray< T >::operator() ( const RWSlice & i,
int j,
int k )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWMathVec that contains the elements at (i th, j th, k th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [22/50]

template<class T >
const RWMathVec< T > RWMathArray< T >::operator() ( const RWSlice & i,
int j,
int k ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWMathVec that contains the elements at (i th, j th, k th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [23/50]

template<class T >
RWGenMat< T > RWMathArray< T >::operator() ( const RWSlice & i,
int j,
int k,
const RWSlice & l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWGenMat that contains the elements at (i th, j th, k th, l th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [24/50]

template<class T >
const RWGenMat< T > RWMathArray< T >::operator() ( const RWSlice & i,
int j,
int k,
const RWSlice & l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWGenMat that contains the elements at (i th, j th, k th, l th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [25/50]

template<class T >
RWMathVec< T > RWMathArray< T >::operator() ( const RWSlice & i,
int j,
int k,
int l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWMathVec that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [26/50]

template<class T >
const RWMathVec< T > RWMathArray< T >::operator() ( const RWSlice & i,
int j,
int k,
int l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWMathVec that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [27/50]

template<class T >
RWGenMat< T > RWMathArray< T >::operator() ( int i,
const RWSlice & j,
const RWSlice & k )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWGenMat that contains the elements at (i th, j th, k th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [28/50]

template<class T >
const RWGenMat< T > RWMathArray< T >::operator() ( int i,
const RWSlice & j,
const RWSlice & k ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWGenMat that contains the elements at (i th, j th, k th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [29/50]

template<class T >
RWMathArray< T > RWMathArray< T >::operator() ( int i,
const RWSlice & j,
const RWSlice & k,
const RWSlice & l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWMathArray that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathArray being returned is a new view of the same data as the array being subscripted.

◆ operator()() [30/50]

template<class T >
const RWMathArray< T > RWMathArray< T >::operator() ( int i,
const RWSlice & j,
const RWSlice & k,
const RWSlice & l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWMathArray that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathArray being returned is a new view of the same data as the array being subscripted.

◆ operator()() [31/50]

template<class T >
RWGenMat< T > RWMathArray< T >::operator() ( int i,
const RWSlice & j,
const RWSlice & k,
int l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWGenMat that contains the elements at (i th, j th, k th, l th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [32/50]

template<class T >
const RWGenMat< T > RWMathArray< T >::operator() ( int i,
const RWSlice & j,
const RWSlice & k,
int l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWGenMat that contains the elements at (i th, j th, k th, l th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [33/50]

template<class T >
RWMathVec< T > RWMathArray< T >::operator() ( int i,
const RWSlice & j,
int k )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWMathVec that contains the elements at (i th, j th, k th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [34/50]

template<class T >
const RWMathVec< T > RWMathArray< T >::operator() ( int i,
const RWSlice & j,
int k ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWMathVec that contains the elements at (i th, j th, k th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [35/50]

template<class T >
RWGenMat< T > RWMathArray< T >::operator() ( int i,
const RWSlice & j,
int k,
const RWSlice & l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWGenMat that contains the elements at (i th, j th, k th, l th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [36/50]

template<class T >
const RWGenMat< T > RWMathArray< T >::operator() ( int i,
const RWSlice & j,
int k,
const RWSlice & l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWGenMat that contains the elements at (i th, j th, k th, l th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [37/50]

template<class T >
RWMathVec< T > RWMathArray< T >::operator() ( int i,
const RWSlice & j,
int k,
int l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWMathVec that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [38/50]

template<class T >
const RWMathVec< T > RWMathArray< T >::operator() ( int i,
const RWSlice & j,
int k,
int l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWMathVec that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [39/50]

template<class T >
RWMathVec< T > RWMathArray< T >::operator() ( int i,
int j,
const RWSlice & k )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWMathVec that contains the elements at (i th, j th, k th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [40/50]

template<class T >
const RWMathVec< T > RWMathArray< T >::operator() ( int i,
int j,
const RWSlice & k ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWMathVec that contains the elements at (i th, j th, k th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [41/50]

template<class T >
RWGenMat< T > RWMathArray< T >::operator() ( int i,
int j,
const RWSlice & k,
const RWSlice & l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWGenMat that contains the elements at (i th, j th, k th, l th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [42/50]

template<class T >
const RWGenMat< T > RWMathArray< T >::operator() ( int i,
int j,
const RWSlice & k,
const RWSlice & l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWGenMat that contains the elements at (i th, j th, k th, l th) position of the array. The RWGenMat being returned is a new view of the same data as the array being subscripted.

◆ operator()() [43/50]

template<class T >
RWMathVec< T > RWMathArray< T >::operator() ( int i,
int j,
const RWSlice & k,
int l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWMathVec that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [44/50]

template<class T >
const RWMathVec< T > RWMathArray< T >::operator() ( int i,
int j,
const RWSlice & k,
int l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWMathVec that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [45/50]

template<class T >
T & RWMathArray< T >::operator() ( int i,
int j,
int k )
inline

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a reference to the element at (i th, j th, k th) position of the array.

◆ operator()() [46/50]

template<class T >
T RWMathArray< T >::operator() ( int i,
int j,
int k ) const
inline

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns the element at (i th, j th, k th) position of the array.

◆ operator()() [47/50]

template<class T >
RWMathVec< T > RWMathArray< T >::operator() ( int i,
int j,
int k,
const RWSlice & l )

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a non-const RWMathVec that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [48/50]

template<class T >
const RWMathVec< T > RWMathArray< T >::operator() ( int i,
int j,
int k,
const RWSlice & l ) const

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a const RWMathVec that contains the elements at (i th, j th, k th, l th) position of the array. The RWMathVec being returned is a new view of the same data as the array being subscripted.

◆ operator()() [49/50]

template<class T >
T & RWMathArray< T >::operator() ( int i,
int j,
int k,
int l )
inline

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns a reference to the element at (i th, j th, k th, l th) position of the array.

◆ operator()() [50/50]

template<class T >
T RWMathArray< T >::operator() ( int i,
int j,
int k,
int l ) const
inline

Subscripting operator for the array, with optional bounds checking. Bounds checking is enabled by defining the preprocessor macro RWBOUNDS_CHECK before including the header file. Returns the element at (i th, j th, k th, l th) position of the array.

◆ operator*=() [1/2]

template<class T >
RWMathArray< T > & RWMathArray< T >::operator*= ( const RWMathArray< T > & v)

Assignment by multiplication operator with conventional meaning. The expression u *= v implies \(u_{i} = u_{i} * v_{i}\) The RWMathArray objects must conform, that is, have the same dimensions.

◆ operator*=() [2/2]

template<class T >
RWMathArray< T > & RWMathArray< T >::operator*= ( const T & s)

Assignment by multiplication operator with conventional meaning. The expression u *= v implies \(u_{i} = u_{i} * s\)

◆ operator++() [1/2]

template<class T >
RWMathArray< T > & RWMathArray< T >::operator++ ( )

Increments or decrements each element of self. The functions taking an integer parameter are invoked if the operator is used as a postfix operator.

◆ operator++() [2/2]

template<class T >
void RWMathArray< T >::operator++ ( int )
inline

Increments or decrements each element of self. The functions taking an integer parameter are invoked if the operator is used as a postfix operator.

◆ operator+=() [1/2]

template<class T >
RWMathArray< T > & RWMathArray< T >::operator+= ( const RWMathArray< T > & v)

Assignment by addition operator with conventional meaning. The expression u += v implies \(u_{i} = u_{i} + v_{i}\) The RWMathArray objects must conform, that is, have the same dimensions.

◆ operator+=() [2/2]

template<class T >
RWMathArray< T > & RWMathArray< T >::operator+= ( const T & s)

Assignment by addition operator with conventional meaning. The expression u += s implies \(u_{i} = u_{i} + s\)

◆ operator--() [1/2]

template<class T >
RWMathArray< T > & RWMathArray< T >::operator-- ( )

Increments or decrements each element of self. The functions taking an integer parameter are invoked if the operator is used as a postfix operator.

◆ operator--() [2/2]

template<class T >
void RWMathArray< T >::operator-- ( int )
inline

Increments or decrements each element of self. The functions taking an integer parameter are invoked if the operator is used as a postfix operator.

◆ operator-=() [1/2]

template<class T >
RWMathArray< T > & RWMathArray< T >::operator-= ( const RWMathArray< T > & v)

Assignment by subtraction operator with conventional meaning. The expression u -= v implies \(u_{i} = u_{i} - v_{i}\) The RWMathArray objects must conform, that is, have the same dimensions.

◆ operator-=() [2/2]

template<class T >
RWMathArray< T > & RWMathArray< T >::operator-= ( const T & s)
inline

Assignment by subtraction operator with conventional meaning. The expression u -= v implies \(u_{i} = u_{i} - s\)

◆ operator/=() [1/2]

template<class T >
RWMathArray< T > & RWMathArray< T >::operator/= ( const RWMathArray< T > & v)

Assignment by division operator with conventional meaning. The expression u /= v implies u_{i} = u_{i} / v_{i} The RWMathArray objects must conform, that is, have the same dimensions.

◆ operator/=() [2/2]

template<class T >
RWMathArray< T > & RWMathArray< T >::operator/= ( const T & s)

Assignment by division operator with conventional meaning. The expression u /= v implies \(u_{i} = u_{i} / s\)

◆ operator=() [1/2]

template<class T >
RWMathArray< T > & RWMathArray< T >::operator= ( const RWMathArray< T > & v)

Assignment operator with conventional meaning. The expression u = v implies \(u_{i} = v_{i}\) The RWMathArray objects must conform, that is, have the same dimensions.

◆ operator=() [2/2]

template<class T >
RWMathArray< T > & RWMathArray< T >::operator= ( const T & s)

Assignment operator with conventional meaning. The expression u = s implies \(u_{i} = s\).

◆ operator==()

template<class T >
bool RWMathArray< T >::operator== ( const RWMathArray< T > & v) const

Returns true if self and the argument are equivalent (or not equivalent). To be equivalent, they must have the same number of rows as well as columns, and each element in self must equal the corresponding element in the argument.

◆ operator[]() [1/2]

template<class T >
T & RWMathArray< T >::operator[] ( const RWIntVec & i)
inline

Subscripting operator for the array, with bounds checking. Returns a reference to the element indexed by i.

◆ operator[]() [2/2]

template<class T >
T RWMathArray< T >::operator[] ( const RWIntVec & i) const
inline

Subscripting operator for the array, with bounds checking. Returns the element indexed by i.

◆ rbegin() [1/2]

template<class T >
reverse_iterator RWMathArray< T >::rbegin ( )
inline

Returns an iterator pointing to the last element of self.

◆ rbegin() [2/2]

template<class T >
const_reverse_iterator RWMathArray< T >::rbegin ( ) const
inline

Returns an iterator pointing to the last element of self.

◆ reference()

template<class T >
RWMathArray< T > & RWMathArray< T >::reference ( const RWMathArray< T > & v)

Makes self a view of data in v. The view currently associated with the array is lost.

◆ rend() [1/2]

template<class T >
reverse_iterator RWMathArray< T >::rend ( )
inline

Returns an iterator pointing to one element past the first element of self.

◆ rend() [2/2]

template<class T >
const_reverse_iterator RWMathArray< T >::rend ( ) const
inline

Returns an iterator pointing to one element past the first element of self.

◆ reshape() [1/3]

template<class T >
void RWMathArray< T >::reshape ( const RWIntVec & v,
Storage storage = COLUMN_MAJOR )

Changes the size of the array. After reshaping, the contents of the array are undefined; that is, they can be and probably will be garbage.

◆ reshape() [2/3]

template<class T >
void RWMathArray< T >::reshape ( size_t m,
size_t n,
size_t o,
size_t p,
Storage storage = COLUMN_MAJOR )

Changes the size of the array. After reshaping, the contents of the array are undefined; that is, they can be and probably will be garbage.

◆ reshape() [3/3]

template<class T >
void RWMathArray< T >::reshape ( size_t m,
size_t n,
size_t o,
Storage storage = COLUMN_MAJOR )

Changes the size of the array. After reshaping, the contents of the array are undefined; that is, they can be and probably will be garbage.

◆ resize() [1/3]

template<class T >
void RWMathArray< T >::resize ( const RWIntVec & v,
Storage storage = COLUMN_MAJOR )

Changes the size of the array, adding 0s or truncating as necessary.

◆ resize() [2/3]

template<class T >
void RWMathArray< T >::resize ( size_t m,
size_t n,
size_t o,
size_t p,
Storage storage = COLUMN_MAJOR )

Changes the size of the array, adding 0s or truncating as necessary.

◆ resize() [3/3]

template<class T >
void RWMathArray< T >::resize ( size_t m,
size_t n,
size_t o,
Storage storage = COLUMN_MAJOR )

Changes the size of the array, adding 0s or truncating as necessary.

◆ restoreFrom() [1/2]

template<class T >
void RWMathArray< T >::restoreFrom ( RWFile & )

Restores self from a RWFile. To use this function with a user-defined type, the corresponding operator>> must be defined:

RWFile& operator>>(RWFile&, T&);
Represents an abstraction of a filesystem regular file.
Definition rwfile.h:68

◆ restoreFrom() [2/2]

template<class T >
void RWMathArray< T >::restoreFrom ( RWvistream & )

Restores self from a virtual stream. To use this function with a user-defined type, the corresponding operator>> must be defined:

RWvistream& operator>>(RWvistream& T&);
Abstract base class providing an interface for format-independent retrieval of fundamental types and ...
Definition vstream.h:244

◆ saveOn() [1/2]

template<class T >
void RWMathArray< T >::saveOn ( RWFile & ) const

Stores self in a binary format to an RWFile. To use these functions with a user-defined type, the corresponding operator<< must be defined:

RWFile& operator<<(RWFile&, T&);

◆ saveOn() [2/2]

template<class T >
void RWMathArray< T >::saveOn ( RWvostream & ) const

Stores self to a RWvostream. To use these functions with a user-defined type, the corresponding operator<< must be defined:

RWvostream& operator<<(RWvostream& T&);
Abstract base class that provides an interface for format-dependent storage of fundamental types and ...
Definition vstream.h:749

◆ slice()

template<class T >
RWMathArray< T > RWMathArray< T >::slice ( const RWIntVec & start,
const RWIntVec & lgt,
const RWGenMat< int > & strider ) const

Returns an array that views a slice of the array. The slice begins at element start and is of size lgt. The increment between successive elements in the slice's jth dimension is given by the jth column of the matrix strider. For 3-dimensional and 4-dimensional arrays, most useful slices can be more simply constructed using subscripting.

Friends And Related Symbol Documentation

◆ abs() [1/5]

template<class T >
RWMathArray< double > abs ( const RWMathArray< DComplex > & )
related

Returns the absolute values of each element.

Example
#include <rw/math/mtharray.h>
#include <iostream>
const double adata[] = {1.2, 2.4, -1.2, 0.8, -4.5};
int main() {
RWMathArray<double> a(adata, 5, 1, 1);
std::cout << b;
return 0;
}
RWMathArray< double > abs(const RWMathArray< double > &)

Program Output:

5x1x1 [
1.2
2.4
1.2
0.8
4.5
]

See the example in abs(const RWMathArray<double>&).

Note
The absolute value of a complex number is of type double. Therefore, if abs() is invoked for class RWMathArray, a vector of class RWMathArray is returned.

◆ abs() [2/5]

template<class T >
RWMathArray< double > abs ( const RWMathArray< double > & )
related

Returns the absolute values of each element.

Example
#include <rw/math/mtharray.h>
#include <iostream>
const double adata[] = {1.2, 2.4, -1.2, 0.8, -4.5};
int main() {
RWMathArray<double> a(adata, 5, 1, 1);
std::cout << b;
return 0;
}

Program Output:

5x1x1 [
1.2
2.4
1.2
0.8
4.5
]

◆ abs() [3/5]

template<class T >
RWMathArray< float > abs ( const RWMathArray< float > & )
related

Returns the absolute values of each element.

Example
#include <rw/math/mtharray.h>
#include <iostream>
const double adata[] = {1.2, 2.4, -1.2, 0.8, -4.5};
int main() {
RWMathArray<double> a(adata, 5, 1, 1);
std::cout << b;
return 0;
}

Program Output:

5x1x1 [
1.2
2.4
1.2
0.8
4.5
]

See the example in abs(const RWMathArray<double>&).

◆ abs() [4/5]

template<class T >
RWMathArray< int > abs ( const RWMathArray< int > & )
related

Returns the absolute values of each element.

Example
#include <rw/math/mtharray.h>
#include <iostream>
const double adata[] = {1.2, 2.4, -1.2, 0.8, -4.5};
int main() {
RWMathArray<double> a(adata, 5, 1, 1);
std::cout << b;
return 0;
}

Program Output:

5x1x1 [
1.2
2.4
1.2
0.8
4.5
]

See the example in abs(const RWMathArray<double>&).

◆ abs() [5/5]

template<class T >
RWMathArray< signed char > abs ( const RWMathArray< signed char > & )
related

Returns the absolute values of each element.

Example
#include <rw/math/mtharray.h>
#include <iostream>
const double adata[] = {1.2, 2.4, -1.2, 0.8, -4.5};
int main() {
RWMathArray<double> a(adata, 5, 1, 1);
std::cout << b;
return 0;
}

Program Output:

5x1x1 [
1.2
2.4
1.2
0.8
4.5
]

See the example in abs(const RWMathArray<double>&).

◆ acos()

template<class T >
RWMathArray< T > acos ( const RWMathArray< T > & x)
related

Returns arc cosines y such that \(y_{i} = cos^{-1} (x_{i})\). The yi(in radians) are in the range \(0 < y_{i} \leq \pi\), for elements xi with absolute values \(|x_{i}| \leq 1\).

◆ arg()

template<class T >
RWMathArray< double > arg ( const RWMathArray< DComplex > & v)
related

Returns the arguments ai (in radians) of x in the range \(-\pi < a_{i} \leq \pi\), where \(a_{i} = tan^{-1}[Im(x_{i})/Re(x_{i})]\). Multiple valued functions of complex arguments, such as sqrt() and log(), are therefore constrained to their principle value.

◆ asin()

template<class T >
RWMathArray< T > asin ( const RWMathArray< T > & x)
related

Takes x as an argument and returns arc sines y such that \(y_{i} = sin^{-1} (x_{i})\). The yi(in radians) are in the range \(-\pi/2 < y_{i} \leq \pi/2\) , for elements xi with absolute values \(|x_{i}| \leq 1\).

◆ atan()

template<class T >
RWMathArray< T > atan ( const RWMathArray< T > & x)
related

Takes x and returns y of arc tangents (in radians), such that \(y_{i} = tan^{-1}x_{i}\), where \(-\pi/2 < y_{i} \leq \pi/2\).

At least one of the arguments xi or yi must be nonzero.

◆ atan2()

template<class T >
RWMathArray< T > atan2 ( const RWMathArray< T > & x,
const RWMathArray< T > & y )
related

Takes two arguments and returns quadrant correct arc tangents z (in radians), such that \(z_{i} = tan^{-1} ( x_{i}/y_{i})\). For each element i, the expression \(atan2(x_{i}, y_{i})\) is mathematically equivalent to:

\[ tan^{-1}\left(\frac{x_i}{y_i}\right) \]

At least one of the arguments xi or yi must be nonzero.

◆ ceil()

template<class T >
RWMathArray< T > ceil ( const RWMathArray< T > & x)
related

Takes x as an argument and returns y such that yi corresponds to the next integer greater than or equal to xi. For example, if x = [ -1.3, 4.3, 7.9] then y = [ -1, 5, 8].

◆ conj()

template<class T >
RWMathArray< DComplex > conj ( const RWMathArray< DComplex > & v)
related

Takes complex x as an argument and returns the complex conjugates x*. For example, if xi = (2.3, 1.4), then xi* = (2.3, -1.4).

◆ cos()

template<class T >
RWMathArray< T > cos ( const RWMathArray< T > & x)
related

Takes x as an argument and returns y such that \(y_{i} = cos(x_{i})\). The xi are in radians. For complex arguments, the complex cosine is returned.

◆ cosh()

template<class T >
RWMathArray< T > cosh ( const RWMathArray< T > & x)
related

Takes x as an argument and returns hyperbolic cosines y such that \(y_{i} = cosh(x_{i})\). For complex arguments, the complex hyperbolic cosine is returned.

◆ exp()

template<class T >
RWMathArray< T > exp ( const RWMathArray< T > & x)
related

Takes an argument x and returns y such that:

\[ y_i = e^{x_i} \]

If class T is complex, the complex exponential is returned.

◆ floor()

template<class T >
RWMathArray< T > floor ( const RWMathArray< T > & x)
related

Takes x as an argument and returns y such that yi corresponds to the largest integer less than or equal to xi. For example, if x = [ 1.3, 4.4, -3.2], then y = [ 1, 4, -4].

◆ frobNorm() [1/3]

template<class T >
double frobNorm ( const RWMathArray< DComplex > & v)
related

Computes the Frobenius norm, which is the square root of the sum of squares of its entries. For a vector, the formula is:

\[ \left \| A \right \|_{\text{Frob}} = \sqrt{\sum_{i_{0}=0}^{M_{0}-1} \sum_{i_{n-1}=0}^{M_{n-1}-1} \left | \text{a}_{i_{o}...i_{n-1}} \right |^2} \]

◆ frobNorm() [2/3]

template<class T >
double frobNorm ( const RWMathArray< double > & v)
related

Computes the Frobenius norm, which is the square root of the sum of squares of its entries. For a vector, the formula is:

\[ \left \| A \right \|_{\text{Frob}} = \sqrt{\sum_{i_{0}=0}^{M_{0}-1} \sum_{i_{n-1}=0}^{M_{n-1}-1} \left | \text{a}_{i_{o}...i_{n-1}} \right |^2} \]

◆ frobNorm() [3/3]

template<class T >
float frobNorm ( const RWMathArray< float > & v)
related

Computes the Frobenius norm, which is the square root of the sum of squares of its entries. For a vector, the formula is:

\[ \left \| A \right \|_{\text{Frob}} = \sqrt{\sum_{i_{0}=0}^{M_{0}-1} \sum_{i_{n-1}=0}^{M_{n-1}-1} \left | \text{a}_{i_{o}...i_{n-1}} \right |^2} \]

◆ imag

template<class T >
RWMathArray< double > imag ( const RWMathArray< DComplex > & v)
friend

Takes complex x as an argument and returns y containing the imaginary parts \(y_{i} = Im(x_{i})\). With most versions of complex, the results can be used as an l-value:

DComplex(3, 0)); // (0, 0), (0, 0), ...
imag(v) = 1.0; // (0, 1), (0, 1), ...
friend RWMathArray< double > imag(const RWMathArray< DComplex > &v)

◆ log()

template<class T >
RWMathArray< T > log ( const RWMathArray< T > & x)
related

Takes x as an argument and returns natural logarithms y such that \(y_{i}=log(x_{i})\). The arguments x i must not be 0. For complex arguments, the principal value of the complex natural logarithm is returned.

◆ log10()

template<class T >
RWMathArray< T > log10 ( const RWMathArray< T > & x)
related

Takes x as an argument and returns base 10 logarithms y such that \(y_{i}=log_{10}(x_{i})\). The arguments x i must not be 0.

◆ maxIndex()

template<class T >
RWIntVec maxIndex ( const RWMathArray< T > & )
related

Return the index of the maximum element of the vector. If instead you want the maximum value use function maxValue().

◆ maxNorm() [1/3]

template<class T >
double maxNorm ( const RWMathArray< DComplex > & v)
related

Returns the value of the element with largest absolute value. Note that this is not a norm in the mathematical sense of the word.

◆ maxNorm() [2/3]

template<class T >
double maxNorm ( const RWMathArray< double > & v)
related

Returns the value of the element with largest absolute value. Note that this is not a norm in the mathematical sense of the word.

◆ maxNorm() [3/3]

template<class T >
float maxNorm ( const RWMathArray< float > & v)
related

Returns the value of the element with largest absolute value. Note that this is not a norm in the mathematical sense of the word.

◆ maxValue()

template<class T >
T maxValue ( const RWMathArray< T > & )
related

Return the maximum value.

◆ mean()

template<class T >
T mean ( const RWMathArray< T > & V)
related

Takes a RWMathArray an argument and returns <x>, the mean value, where:

\[ \langle x \rangle = \frac{1}{n}\sum_{i=0}^{n-1}x_i \]

For example, if x = [1, 4, 3, 4], then <x> = 3.

◆ minIndex()

template<class T >
RWIntVec minIndex ( const RWMathArray< T > & )
related

Return the index of the minimum element of the vector. If instead you want the minimum value use function minValue().

◆ minValue()

template<class T >
T minValue ( const RWMathArray< T > & )
related

Return the minimum value.

◆ norm()

template<class T >
RWMathArray< double > norm ( const RWMathArray< DComplex > & )
related

Takes complex x as an argument and returns real y containing the norm:

\[ y_{i} = [Re(x_{i})]^{2} + [Im(x_{i})]^{2} \]

◆ operator*() [1/3]

template<class T >
RWMathArray< T > operator* ( const RWMathArray< T > & u,
const RWMathArray< T > & v )
related

Multiplication operator, with conventional meaning, applied element-by-element. For matrices u, v, and w, the expression w = u * v implies \(w_{i} = u_{i} * v_{i}\). Therefore, operator*() implies an element-by-element multiply, not the inner product. The arrays must conform, that is, have the same dimensions, or an exception with value RWMATH_NMATCH occurs.

◆ operator*() [2/3]

template<class T >
RWMathArray< T > operator* ( const RWMathArray< T > & u,
const T & s )
related

Multiplication operator, with conventional meaning, applied element-by-element. For matrices u, w, and scaler s, the expression w = u * s implies \(w_{i} = u_{i} * s\).

◆ operator*() [3/3]

template<class T >
RWMathArray< T > operator* ( const T & s,
const RWMathArray< T > & v )
related

Multiplication operator, with conventional meaning, applied element-by-element. For matrices v, w, and scaler s, the expression w = s * v implies \(w_{i} = s * v_{i}\).

◆ operator+() [1/4]

template<class T >
RWMathArray< T > operator+ ( const RWMathArray< T > & u)
related

Unary plus operator, with conventional meaning, applied element-by-element. For matrix u, and w, the expression w = +u implies \(w_{i} = +u_{i}\).

◆ operator+() [2/4]

template<class T >
RWMathArray< T > operator+ ( const RWMathArray< T > & u,
const RWMathArray< T > & v )
related

Addition operator, with conventional meaning, applied element-by-element. For matrices u, v, and w, the expression w = u + v implies \(w_{i} = u_{i} + v_{i}\). The arrays must conform, that is, have the same dimensions, or an exception with value RWMATH_NMATCH occurs.

◆ operator+() [3/4]

template<class T >
RWMathArray< T > operator+ ( const RWMathArray< T > & u,
const T & s )
related

Addition operator, with conventional meaning, applied element-by-element. For matrices u, w, and scaler s, the expression w = u + s implies \(w_{i} = u_{i} + s\).

◆ operator+() [4/4]

template<class T >
RWMathArray< T > operator+ ( const T & s,
const RWMathArray< T > & v )
related

Addition operator, with conventional meaning, applied element-by-element. For matrices v, w, and scaler s, the expression w = s + v implies \(w_{i} = s + v_{i}\).

◆ operator-() [1/4]

template<class T >
RWMathArray< T > operator- ( const RWMathArray< T > & u)
related

Unary minus operator, with conventional meaning, applied element-by-element. For matrix u, and w, the expression w = -u implies \(w_{i} = -u_{i}\).

◆ operator-() [2/4]

template<class T >
RWMathArray< T > operator- ( const RWMathArray< T > & u,
const RWMathArray< T > & v )
related

Subtraction operator, with conventional meaning, applied element-by-element. For matrices u, v, and w, the expression w = u - v implies \(w_{i} = u_{i} - v_{i}\). The arrays must conform, that is, have the same dimensions, or an exception with value RWMATH_NMATCH occurs.

◆ operator-() [3/4]

template<class T >
RWMathArray< T > operator- ( const RWMathArray< T > & u,
const T & s )
related

Subtraction operator, with conventional meaning, applied element-by-element. For matrices u, w, and scaler s, the expression w = u - s implies \(w_{i} = u_{i} - s\).

◆ operator-() [4/4]

template<class T >
RWMathArray< T > operator- ( const T & s,
const RWMathArray< T > & v )
related

Subtraction operator, with conventional meaning, applied element-by-element. For matrices v, w, and scaler s, the expression w = s - v implies \(w_{i} = s - v_{i}\).

◆ operator/() [1/3]

template<class T >
RWMathArray< T > operator/ ( const RWMathArray< T > & u,
const RWMathArray< T > & v )
related

Division operator, with conventional meaning, applied element-by-element. For matrices u, v, and w, the expression w = u / v implies \(w_{i} = u_{i} / v_{i}\). The arrays must conform, that is, have the same dimensions, or an exception with value RWMATH_NMATCH occurs.

◆ operator/() [2/3]

template<class T >
RWMathArray< T > operator/ ( const RWMathArray< T > & u,
const T & s )
related

Division operator, with conventional meaning, applied element-by-element. For matrices u, w, and scaler s, the expression w = u / s implies \(w_{i} = u_{i} / s\).

◆ operator/() [3/3]

template<class T >
RWMathArray< T > operator/ ( const T & s,
const RWMathArray< T > & v )
related

Division operator, with conventional meaning, applied element-by-element. For matrices v, w, and scaler s, the expression w = s / v implies \(w_{i} = s / v_{i}\).

◆ pow() [1/3]

template<class T >
RWMathArray< T > pow ( const RWMathArray< T > & x,
const RWMathArray< T > & y )
related

The function pow() takes two arguments: pow( x, y ).

Returns z such that:

\[ z_i = (x_i)^{y_i} \]

If the number of elements in x does not match the number of elements in y, an exception with value RWMATH_MNMATCH will occur.

◆ pow() [2/3]

template<class T >
RWMathArray< T > pow ( const RWMathArray< T > & x,
T y )
related

The function pow() takes two arguments: pow( x, y ).

Returns z such that:

\[ z_i = (x_i)^{y} \]

◆ pow() [3/3]

template<class T >
RWMathArray< T > pow ( T x,
const RWMathArray< T > & y )
related

The function pow() takes two arguments: pow( x, y ).

Returns z such that:

\[ z_i = (x)^{y_i} \]

◆ real

template<class T >
RWMathArray< double > real ( const RWMathArray< DComplex > & v)
friend

Takes a complex argument x and returns real y containing the real part \(y_{i}=Re(x_{i})\). With most versions of complex, the results can be used as an l-value:

RWMathArray<DComplex> v(5, 5, 5, 0); // (0, 0), (0, 0), ...
real(v) = 1.0; // (1, 0), (1, 0), ...
friend RWMathArray< double > real(const RWMathArray< DComplex > &v)

◆ sin()

template<class T >
RWMathArray< T > sin ( const RWMathArray< T > & V)
related

The function sin() takes x as an argument and returns y such that \(y_{i} = sin(x_{i})\). The xi are in radians. For complex classes, the complex sine is returned.

◆ sinh()

template<class T >
RWMathArray< T > sinh ( const RWMathArray< T > & V)
related

The function sinh() takes x as an argument and returns y such that \(y_{i} = sinh(x_{i})\). For complex classes, the complex hyperbolic sine is returned.

◆ sqrt()

template<class T >
RWMathArray< T > sqrt ( const RWMathArray< T > & V)
related

The square root function. Takes x as an argument and returns y such that \(y_{i} = (x_{i})^{1/2}\). For complex classes, the principal value of the complex square root is returned.

◆ tan()

template<class T >
RWMathArray< T > tan ( const RWMathArray< T > & x)
related

The function tan() takes argument x> and returns y such that \(y_{i} = tan(x_{i})\).

◆ tanh()

template<class T >
RWMathArray< T > tanh ( const RWMathArray< T > & x)
related

The function tanh() takes argument x and returns y such that \(y_{i} = tanh(x_{i})\).

◆ toChar()

template<class T >
RWMathArray< signed char > toChar ( const RWMathArray< int > & v)
related

Converts an RWMathArray instance into a corresponding RWMathArray instance. Note that this is a narrowing operation; high order bits are removed.

See also
RWConvertMathArray

◆ toFloat()

template<class T >
RWMathArray< float > toFloat ( const RWMathArray< double > & v)
related

Converts an RWMathArray instance into a corresponding RWMathArray instance. Note that this is a narrowing operation; high order bits are removed.

See also
RWConvertMathArray

◆ toGenMat()

template<class T >
RWGenMat< T > toGenMat ( const RWMathArray< T > & )
related

Converts a 2-dimensional array into a corresponding general matrix class. The array must actually have 2 dimensions or a runtime error occurs. The newly constructed matrix is a new view of the same data as the array; a copy of the data is not made.

◆ toInt() [1/2]

template<class T >
RWMathArray< int > toInt ( const RWMathArray< double > & v)
related

Converts an RWMathArray instance into a corresponding RWMathArray instance. Note that truncation occurs.

See also
RWConvertMathArray

◆ toInt() [2/2]

template<class T >
RWMathArray< int > toInt ( const RWMathArray< float > & v)
related

Converts an RWMathArray instance into a corresponding RWMathArray instance. Note that truncation occurs.

See also
RWConvertMathArray

◆ toScalar()

template<class T >
T toScalar ( const RWMathArray< T > & )
related

Converts a 0-dimensional array into a scalar. The array must actually have 0 dimensions or a runtime error occurs.

◆ toVec()

template<class T >
RWMathVec< T > toVec ( const RWMathArray< T > & )
related

Converts a 1-dimensional array into a corresponding RWMathVec. The array must actually have 1 dimension or a runtime error occurs. The newly constructed vector is a new view of the same data as the array; a copy of the data is not made.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.