Reductions.h File Reference

General global reduction functions. More...

#include "Tiny/Tensor.h"
#include "Tiny/TinyMatrix.h"
#include "Tiny/Vector.h"

Include dependency graph for Tiny/Reductions.h:

This graph shows which files directly or indirectly include this file:


Functions

template<int Dim, class T , class EngineTag , class Op >
globalReduction (const Vector< Dim, T, EngineTag > &v, const Op &op)
template<int Dim, class T , class EngineTag , class Op >
globalReduction (const Tensor< Dim, T, EngineTag > &t, const Op &op)
template<int Dim, class T , class Op >
globalReduction (const Tensor< Dim, T, Full > &t, const Op &op)
template<int Dim, class T , class Op >
globalReduction (const Tensor< Dim, T, Antisymmetric > &t, const Op &op)
template<int Dim, class T , class Op >
globalReduction (const Tensor< Dim, T, Diagonal > &t, const Op &op)
template<int Dim1, int Dim2, class T , class EngineTag , class Op >
globalReduction (const TinyMatrix< Dim1, Dim2, T, EngineTag > &m, const Op &op)
template<int Dim1, int Dim2, class T , class Op >
globalReduction (const TinyMatrix< Dim1, Dim2, T, Full > &m, const Op &op)
template<int Dim, class T , class EngineTag >
sum (const Vector< Dim, T, EngineTag > &v)
 Sum up the elements of a Vector.
template<int Dim, class T , class EngineTag >
prod (const Vector< Dim, T, EngineTag > &v)
 Compute the product of the elements of a Vector.
template<int Dim, class T , class EngineTag >
min (const Vector< Dim, T, EngineTag > &v)
 Find the smallest element of a Vector.
template<int Dim, class T , class EngineTag >
max (const Vector< Dim, T, EngineTag > &v)
 Find the largest element of a Vector.
template<int Dim, class T , class EngineTag >
bool all (const Vector< Dim, T, EngineTag > &v)
 Report if all of the elements of a Vector are true.
template<int Dim, class T , class EngineTag >
bool any (const Vector< Dim, T, EngineTag > &v)
 Report if some of the elments of a Vector are true.
template<int Dim, class T , class EngineTag >
bitOr (const Vector< Dim, T, EngineTag > &v)
 Bitwise-or all of the elements together.
template<int Dim, class T , class EngineTag >
bitAnd (const Vector< Dim, T, EngineTag > &v)
 Bitwise-and all of the elements together.
template<int Dim, class T , class EngineTag >
sum (const Tensor< Dim, T, EngineTag > &t)
 Sum up the elements of a Tensor.
template<int Dim, class T >
sum (const Tensor< Dim, T, Antisymmetric > &t)
 Trivial case (elements must sum to zero).
template<int Dim, class T , class EngineTag >
prod (const Tensor< Dim, T, EngineTag > &t)
 Compute the product of the elements of a Tensor.
template<int Dim, class T >
prod (const Tensor< Dim, T, Antisymmetric > &t)
 Trivial case (diagonal is zero).
template<int Dim, class T , class EngineTag >
min (const Tensor< Dim, T, EngineTag > &t)
 Find the smallest element of a Tensor.
template<int Dim, class T , class EngineTag >
max (const Tensor< Dim, T, EngineTag > &t)
 Find the largest element of a Tensor.
template<int Dim, class T , class EngineTag >
bool all (const Tensor< Dim, T, EngineTag > &t)
 Report if all of the elements of a Tensor are true.
template<int Dim, class T >
bool all (const Tensor< Dim, T, Antisymmetric > &t)
 Trivial case (diagonal is zero).
template<int Dim, class T , class EngineTag >
bool any (const Tensor< Dim, T, EngineTag > &t)
 Report if some of the elments of a Tensor are true.
template<int Dim, class T , class EngineTag >
bitOr (const Tensor< Dim, T, EngineTag > &t)
 Bitwise-or all of the elements together.
template<int Dim, class T , class EngineTag >
bitAnd (const Tensor< Dim, T, EngineTag > &t)
 Bitwise-and all of the elements together.
template<int Dim1, int Dim2, class T , class EngineTag >
sum (const TinyMatrix< Dim1, Dim2, T, EngineTag > &m)
 Sum up the elements of a TinyMatrix.
template<int Dim1, int Dim2, class T , class EngineTag >
prod (const TinyMatrix< Dim1, Dim2, T, EngineTag > &m)
 Compute the product of the elements of a TinyMatrix.
template<int Dim1, int Dim2, class T , class EngineTag >
min (const TinyMatrix< Dim1, Dim2, T, EngineTag > &m)
 Find the smallest element of a TinyMatrix.
template<int Dim1, int Dim2, class T , class EngineTag >
max (const TinyMatrix< Dim1, Dim2, T, EngineTag > &m)
 Find the largest element of a TinyMatrix.
template<int Dim1, int Dim2, class T , class EngineTag >
bool all (const TinyMatrix< Dim1, Dim2, T, EngineTag > &m)
 Report if all of the elements of a TinyMatrix are true.
template<int Dim1, int Dim2, class T , class EngineTag >
bool any (const TinyMatrix< Dim1, Dim2, T, EngineTag > &m)
 Report if some of the elments of a TinyMatrix are true.
template<int Dim1, int Dim2, class T , class EngineTag >
bitOr (const TinyMatrix< Dim1, Dim2, T, EngineTag > &m)
 Bitwise-or all of the elements together.
template<int Dim1, int Dim2, class T , class EngineTag >
bitAnd (const TinyMatrix< Dim1, Dim2, T, EngineTag > &m)
 Bitwise-and all of the elements together.

Detailed Description

General global reduction functions.

Functions:

Note: these functions work for reductions that apply pairwise arithmetic operations on the elements (e.g., sum, prod). This does not work for reductions like all() and any().


Function Documentation

template<int Dim, class T , class EngineTag , class Op >
T globalReduction ( const Vector< Dim, T, EngineTag > &  v,
const Op &  op 
) [inline]

Referenced by bitAnd(), bitOr(), max(), min(), prod(), and sum().

template<int Dim, class T , class EngineTag , class Op >
T globalReduction ( const Tensor< Dim, T, EngineTag > &  t,
const Op &  op 
) [inline]

template<int Dim, class T , class Op >
T globalReduction ( const Tensor< Dim, T, Full > &  t,
const Op &  op 
) [inline]

template<int Dim, class T , class Op >
T globalReduction ( const Tensor< Dim, T, Antisymmetric > &  t,
const Op &  op 
) [inline]

template<int Dim, class T , class Op >
T globalReduction ( const Tensor< Dim, T, Diagonal > &  t,
const Op &  op 
) [inline]

template<int Dim1, int Dim2, class T , class EngineTag , class Op >
T globalReduction ( const TinyMatrix< Dim1, Dim2, T, EngineTag > &  m,
const Op &  op 
) [inline]

template<int Dim1, int Dim2, class T , class Op >
T globalReduction ( const TinyMatrix< Dim1, Dim2, T, Full > &  m,
const Op &  op 
) [inline]

template<int Dim, class T , class EngineTag >
T sum ( const Vector< Dim, T, EngineTag > &  v  )  [inline]

Sum up the elements of a Vector.

References globalReduction().

template<int Dim, class T , class EngineTag >
T prod ( const Vector< Dim, T, EngineTag > &  v  )  [inline]

Compute the product of the elements of a Vector.

References globalReduction().

template<int Dim, class T , class EngineTag >
T min ( const Vector< Dim, T, EngineTag > &  v  )  [inline]

Find the smallest element of a Vector.

References globalReduction().

template<int Dim, class T , class EngineTag >
T max ( const Vector< Dim, T, EngineTag > &  v  )  [inline]

Find the largest element of a Vector.

References globalReduction().

template<int Dim, class T , class EngineTag >
bool all ( const Vector< Dim, T, EngineTag > &  v  )  [inline]

Report if all of the elements of a Vector are true.

template<int Dim, class T , class EngineTag >
bool any ( const Vector< Dim, T, EngineTag > &  v  )  [inline]

Report if some of the elments of a Vector are true.

template<int Dim, class T , class EngineTag >
T bitOr ( const Vector< Dim, T, EngineTag > &  v  )  [inline]

Bitwise-or all of the elements together.

References globalReduction().

template<int Dim, class T , class EngineTag >
T bitAnd ( const Vector< Dim, T, EngineTag > &  v  )  [inline]

Bitwise-and all of the elements together.

References globalReduction().

template<int Dim, class T , class EngineTag >
T sum ( const Tensor< Dim, T, EngineTag > &  t  )  [inline]

Sum up the elements of a Tensor.

References globalReduction().

template<int Dim, class T >
T sum ( const Tensor< Dim, T, Antisymmetric > &  t  )  [inline]

Trivial case (elements must sum to zero).

template<int Dim, class T , class EngineTag >
T prod ( const Tensor< Dim, T, EngineTag > &  t  )  [inline]

Compute the product of the elements of a Tensor.

References globalReduction().

template<int Dim, class T >
T prod ( const Tensor< Dim, T, Antisymmetric > &  t  )  [inline]

Trivial case (diagonal is zero).

template<int Dim, class T , class EngineTag >
T min ( const Tensor< Dim, T, EngineTag > &  t  )  [inline]

Find the smallest element of a Tensor.

References globalReduction().

template<int Dim, class T , class EngineTag >
T max ( const Tensor< Dim, T, EngineTag > &  t  )  [inline]

Find the largest element of a Tensor.

References globalReduction().

template<int Dim, class T , class EngineTag >
bool all ( const Tensor< Dim, T, EngineTag > &  t  )  [inline]

Report if all of the elements of a Tensor are true.

template<int Dim, class T >
bool all ( const Tensor< Dim, T, Antisymmetric > &  t  )  [inline]

Trivial case (diagonal is zero).

template<int Dim, class T , class EngineTag >
bool any ( const Tensor< Dim, T, EngineTag > &  t  )  [inline]

Report if some of the elments of a Tensor are true.

template<int Dim, class T , class EngineTag >
T bitOr ( const Tensor< Dim, T, EngineTag > &  t  )  [inline]

Bitwise-or all of the elements together.

References globalReduction().

template<int Dim, class T , class EngineTag >
T bitAnd ( const Tensor< Dim, T, EngineTag > &  t  )  [inline]

Bitwise-and all of the elements together.

References globalReduction().

template<int Dim1, int Dim2, class T , class EngineTag >
T sum ( const TinyMatrix< Dim1, Dim2, T, EngineTag > &  m  )  [inline]

Sum up the elements of a TinyMatrix.

References globalReduction().

template<int Dim1, int Dim2, class T , class EngineTag >
T prod ( const TinyMatrix< Dim1, Dim2, T, EngineTag > &  m  )  [inline]

Compute the product of the elements of a TinyMatrix.

References globalReduction().

template<int Dim1, int Dim2, class T , class EngineTag >
T min ( const TinyMatrix< Dim1, Dim2, T, EngineTag > &  m  )  [inline]

Find the smallest element of a TinyMatrix.

References globalReduction().

template<int Dim1, int Dim2, class T , class EngineTag >
T max ( const TinyMatrix< Dim1, Dim2, T, EngineTag > &  m  )  [inline]

Find the largest element of a TinyMatrix.

References globalReduction().

template<int Dim1, int Dim2, class T , class EngineTag >
bool all ( const TinyMatrix< Dim1, Dim2, T, EngineTag > &  m  )  [inline]

Report if all of the elements of a TinyMatrix are true.

template<int Dim1, int Dim2, class T , class EngineTag >
bool any ( const TinyMatrix< Dim1, Dim2, T, EngineTag > &  m  )  [inline]

Report if some of the elments of a TinyMatrix are true.

template<int Dim1, int Dim2, class T , class EngineTag >
T bitOr ( const TinyMatrix< Dim1, Dim2, T, EngineTag > &  m  )  [inline]

Bitwise-or all of the elements together.

References globalReduction().

template<int Dim1, int Dim2, class T , class EngineTag >
T bitAnd ( const TinyMatrix< Dim1, Dim2, T, EngineTag > &  m  )  [inline]

Bitwise-and all of the elements together.

References globalReduction().


Generated on Wed Mar 16 06:18:49 2011 for FreePOOMA by  doxygen 1.5.9