lti::boundsFunctor< T > Class Template Reference
Boudaries of a hyperbox enclosing all points of a n-dimensional space.
More...
#include <ltiBoundsFunctor.h>
List of all members.
Classes |
class | parameters |
| the parameters for the class boundsFunctor More...
|
Public Member Functions |
| boundsFunctor () |
| boundsFunctor (const boundsFunctor &other) |
virtual | ~boundsFunctor () |
virtual const char * | getTypeName () const |
void | apply (const matrix< T > &src, vector< T > &min, vector< T > &max) const |
void | minOfRows (const matrix< T > &src, vector< T > &dest) const |
void | minOfRowVectors (const matrix< T > &src, vector< T > &dest) const |
void | maxOfRows (const matrix< T > &src, vector< T > &dest) const |
void | maxOfRowVectors (const matrix< T > &src, vector< T > &dest) const |
void | minOfColumns (const matrix< T > &src, vector< T > &dest) const |
void | minOfColumnVectors (const matrix< T > &src, vector< T > &dest) const |
void | maxOfColumns (const matrix< T > &src, vector< T > &dest) const |
void | maxOfColumnVectors (const matrix< T > &src, vector< T > &dest) const |
void | boundsOfRows (const matrix< T > &src, vector< T > &min, vector< T > &max) const |
void | boundsOfRowVectors (const matrix< T > &src, vector< T > &min, vector< T > &max) const |
void | boundsOfColumns (const matrix< T > &src, vector< T > &min, vector< T > &max) const |
void | boundsOfColumnVectors (const matrix< T > &src, vector< T > &min, vector< T > &max) const |
void | min (const vector< T > &a, const vector< T > &b, vector< T > &dest) const |
void | max (const vector< T > &a, const vector< T > &b, vector< T > &dest) const |
void | clip (vector< T > &a, const vector< T > &lowerBounds, const vector< T > &upperBounds) const |
void | clip (matrix< T > &a, const matrix< T > &lowerBounds, const matrix< T > &upperBounds) const |
boundsFunctor & | copy (const boundsFunctor &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Detailed Description
template<class T>
class lti::boundsFunctor< T >
Boudaries of a hyperbox enclosing all points of a n-dimensional space.
This functor computes for each "dimension" of points in a n-dimensional space the extrema (i.e. minimum and maximum values). This way, it computes the boundaries of a hyperbox where all points are contained.
The points are given in form of vectors. If a matrix is given, the parameter parameters::rowWise indicates if the vectors are taken from the rows (true) or from the columns (false) of the matrix.
Several methods besides the standard apply() are provided in order to clip points into a given hyperbox.
Constructor & Destructor Documentation
copy constructor
- Parameters:
-
Member Function Documentation
The result of this function depends on the value of parameters.rowWise.
If this parameter is true, the functor will compute a vector, whose elements contain each the mean of one column of the matrix (the computes the mean of the rows, where each row is a data point in n-dimensional space. if rowWise is false, the result vector contains the mean of the columns of the matrix (each column a data point).
- Parameters:
-
| src | matrix<T> with the source data. |
| min | vector<T> where the minimum vector of the matrix will be left |
| max | vector<T> where the maximum vector of the matrix will be left |
Alias for boundsOfColumns.
- Parameters:
-
| src | matrix<T> with the source data. |
| min | vector<T> where the minimum will be left. |
| max | vector<T> where the maximum will be left. |
Alias for boundsOfRows.
- Parameters:
-
| src | matrix<T> with the source data. |
| min | vector<T> where the minimum will be left. |
| max | vector<T> where the maximum will be left. |
Clips the values of the matrix a to lowerBounds and upperBounds.
For each matrix element a[i][j], if lowerBounds[i][j] <= a[i][j] <= higherBounds[i][j], the value of a[i][j] remains unchanged. If a[i][j] < lowerBounds[i][j], a[i][j] will be set to lowerBounds[i][j]. Analagous with upperBounds.
- Parameters:
-
| a | matrix<T> to be clipped. |
| lowerBounds | matrix<T> which contains the smallest permitted elements. |
| upperBounds | matrix<T> which contains the largest permitted elements. |
Clips the values of the vector a to lowerBounds and upperBounds.
For each vector element a[i], if lowerBounds[i] <= a[i] <= higherBounds[i], the value of a[i] remains unchanged. If a[i] < lowerBounds[i], a[i] will be set to lowerBounds[i]. Analagous with upperBounds.
- Parameters:
-
| a | vector<T> to be clipped. |
| lowerBounds | vector<T> which contains the smallest permitted elements. |
| upperBounds | vector<T> which contains the largest permitted elements. |
Computes a vector which contains the maximum elements of a and b.
- Parameters:
-
| a | vector<T> first operand |
| b | vector<T> second operand |
| dest | vector<T> which will receive the element-wise maximum of both operands |
This function will compute a vector, whose elements contain each the maximum of one row of the matrix (this computes the n-dimensional equivalent of an upper-right corner of the bounding box of a data set, where each column is a data point in n-dimensional space).
- Parameters:
-
| src | matrix<T> with the source data. |
| dest | matrix<T> where the result will be left. |
Referenced by lti::boundsFunctor< int >::maxOfColumnVectors().
Alias for maxOfColumns.
- Parameters:
-
| src | matrix<T> with the source data. |
| dest | matrix<T> where the result will be left. |
This function will compute a vector, whose elements contain each the maximum of one column of the matrix (this computes the n-dimensional equivalent of an upper-right corner of the bounding box of a data set, where each row is a data point in n-dimensional space).
- Parameters:
-
| src | matrix<T> with the source data. |
| dest | matrix<T> where the result will be left. |
Referenced by lti::boundsFunctor< int >::maxOfRowVectors().
Alias for maxOfRows.
- Parameters:
-
| src | matrix<T> with the source data. |
| dest | matrix<T> where the result will be left. |
Computes a vector which contains the minimum elements of a and b.
- Parameters:
-
| a | vector<T> first operand |
| b | vector<T> second operand |
| dest | vector<T> which will receive the element-wise minimum of both operands |
This function will compute a vector, whose elements contain each the minimum of one row of the matrix (this computes the n-dimensional equivalent of a lower-left corner of the bounding box of a data set, where each column is a data point in n-dimensional space).
- Parameters:
-
| src | matrix<T> with the source data. |
| dest | matrix<T> where the result will be left. |
Referenced by lti::boundsFunctor< int >::minOfColumnVectors().
Alias for minOfColumns.
- Parameters:
-
| src | matrix<T> with the source data. |
| dest | matrix<T> where the result will be left. |
This function will compute a vector, whose elements contain each the minimum of one column of the matrix (this computes the n-dimensional equivalent of a lower-left corner of the bounding box of a data set, where each row is a data point in n-dimensional space).
- Parameters:
-
| src | matrix<T> with the source data. |
| dest | matrix<T> where the result will be left. |
Referenced by lti::boundsFunctor< int >::minOfRowVectors().
Alias for minOfRows.
- Parameters:
-
| src | matrix<T> with the source data. |
| dest | matrix<T> where the result will be left. |
The documentation for this class was generated from the following file: