yat
0.14.5pre
|
Using a functor T to normalize each column. More...
#include <yat/normalizer/RowNormalizer.h>
Public Types | |
typedef T | normalizer_type |
Public Member Functions | |
RowNormalizer (void) | |
Default constructor. | |
RowNormalizer (T norm) | |
Constructor taking a functor norm. | |
template<class Container2D1 , class Container2D2 > | |
void | operator() (const Container2D1 &matrix, Container2D2 &result) const |
Using a functor T to normalize each column.
If the underlying normalizer_type allows normalization "in place", i.e., it allows input range and result range to be the same range, then it is safe to have same container for input as output.
In the case of views and lookups it is more complicated. The assignment is done sequentially, so if the input container and result container have the same underlying data, the normalization is typically not safe.
typedef T theplu::yat::normalizer::RowNormalizer< T >::normalizer_type |
functor used to normalize each column
|
inline |
Each row in matrix is normalized using class T, and assigned to corresponding row in result.
Template argument Container2D1 should be a class modelling the concept Container2D. The template argument Container2D2 should be a class modelling the concept Mutable Container2D.