Jive reference manual
jem::TupleExpr< T, M, N > Class Template Reference

A dummy class representing tuple expressions. More...

#include <jem/base/TupleExpr.h>

Detailed Description

template<class T, int M, int N>
class jem::TupleExpr< T, M, N >

The class TupleExpr is a fictitious class that represents tuple expressions. The template parameter T denotes the type of the elements of the tuple expression, while the template parameters M and N denotes the shape of the tuple expression. For instance, if a and b are both tuples of type Tuple<float,3,2>, then the expression (a + b) is represented by the class TupleExpr<float,3,2>.

The TupleExpr class is used in this documentation to indicate that a function accepts a tuple expression as one of its arguments. For instance, the declaration

template <class T, int M, int N>
void min ( const TupleExpr<T,M,N>& e );

indicates that the function min can be called with any tuple expression with elements of type T and with shape (M,N). Thus, min(a + b) is a valid function call.

The TupleExpr class is conceptually (but not in reality!) a base class of the Tuple class. This means that a Tuple object can be passed to any function expecting a tuple expression. Thus, min(a) is also a valid function call.

See also
Tuple, Tuple expressions, ArrayExpr.