A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator. More...
#include <mrpt/math/CMatrixViews.h>
Classes | |
| struct | mrpt_container |
Public Types | |
| typedef MAT::value_type | value_type |
| typedef CMatrixColumnAccessor < MAT > | mrpt_autotype |
Protected Attributes | |
| MAT * | m_mat |
| size_t | m_colInd |
Methods common to all containers | |
|
| |
| typedef detail::AccessorIterator < CMatrixColumnAccessor< MAT > , value_type > | iterator |
| typedef detail::AccessorIterator < const CMatrixColumnAccessor < MAT >, const value_type > | const_iterator |
| typedef detail::ReverseAccessorIterator < CMatrixColumnAccessor< MAT > , value_type > | reverse_iterator |
| typedef detail::ReverseAccessorIterator < const CMatrixColumnAccessor < MAT >, const value_type > | const_reverse_iterator |
| size_t | countNonZero () const |
| void | fill (const value_type &val) |
| value_type | maximum (size_t *maxIndex=NULL) const |
| value_type | minimum (size_t *minIndex=NULL) const |
| void | minimum_maximum (value_type &out_min, value_type &out_max, size_t *minIndex=NULL, size_t *maxIndex=NULL) const |
| value_type | norm_inf (size_t *maxIndex=NULL) const |
| value_type | sumAll () const |
| template<class CONTAINEROUT > | |
| void | cumsum (CONTAINEROUT &out) const |
| template<class CONTAINEROUT > | |
| CONTAINEROUT | cumsum () const |
| template<class CONTAINER2 > | |
| size_t | countCommonElements (const CONTAINER2 &b) const |
| Counts the number of elements that appear in both containers (comparison through the == operator). | |
| std::vector< double > | histogram (double limit_min, double limit_max, size_t number_bins, bool do_normalization=false) const |
| Computes the normalized or normal histogram of a sequence of numbers given the number of bins and the limits. | |
| template<class F > | |
| mrpt_autotype & | applyToAllElements (value_type(*function)(value_type)) |
| mrpt_autotype & | Sqrt () |
| mrpt_autotype & | Abs () |
| mrpt_autotype & | Square () |
| mrpt_autotype & | Exp () |
| mrpt_autotype & | Log () |
| value_type | squareNorm () const |
| value_type | norm () const |
| value_type | mean () const |
| void | adjustRange (const value_type min_val, const value_type max_val) |
| void | normalize (const value_type min_val=0, const value_type max_val=1) |
| double | std (bool unbiased=true) const |
| void | meanAndStd (double &out_mean, double &out_std, bool unbiased=true) |
| CMatrixColumnAccessor (MAT &mat, size_t colIdx) | |
| CMatrixColumnAccessor () | |
| value_type & | operator[] (const size_t i) |
| value_type | operator[] (const size_t i) const |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| reverse_iterator | rbegin () |
| const_reverse_iterator | rbegin () const |
| reverse_iterator | rend () |
| const_reverse_iterator | rend () const |
| size_t | size () const |
| void | resize (size_t N) |
A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator.
Definition at line 606 of file CMatrixViews.h.
| typedef detail::AccessorIterator<const CMatrixColumnAccessor<MAT>,const value_type> mrpt::math::CMatrixColumnAccessor< MAT >::const_iterator |
Definition at line 621 of file CMatrixViews.h.
| typedef detail::ReverseAccessorIterator<const CMatrixColumnAccessor<MAT>,const value_type> mrpt::math::CMatrixColumnAccessor< MAT >::const_reverse_iterator |
Definition at line 623 of file CMatrixViews.h.
| typedef detail::AccessorIterator<CMatrixColumnAccessor<MAT>,value_type> mrpt::math::CMatrixColumnAccessor< MAT >::iterator |
Definition at line 620 of file CMatrixViews.h.
| typedef CMatrixColumnAccessor<MAT> mrpt::math::CMatrixColumnAccessor< MAT >::mrpt_autotype |
Definition at line 612 of file CMatrixViews.h.
| typedef detail::ReverseAccessorIterator<CMatrixColumnAccessor<MAT>,value_type> mrpt::math::CMatrixColumnAccessor< MAT >::reverse_iterator |
Definition at line 622 of file CMatrixViews.h.
| typedef MAT::value_type mrpt::math::CMatrixColumnAccessor< MAT >::value_type |
Definition at line 611 of file CMatrixViews.h.
| mrpt::math::CMatrixColumnAccessor< MAT >::CMatrixColumnAccessor | ( | MAT & | mat, | |
| size_t | colIdx | |||
| ) | [inline] |
Definition at line 616 of file CMatrixViews.h.
References ASSERT_.
| mrpt::math::CMatrixColumnAccessor< MAT >::CMatrixColumnAccessor | ( | ) | [inline] |
Definition at line 617 of file CMatrixViews.h.
| mrpt_autotype& mrpt::math::CMatrixColumnAccessor< MAT >::Abs | ( | ) | [inline] |
Definition at line 615 of file CMatrixViews.h.
| void mrpt::math::CMatrixColumnAccessor< MAT >::adjustRange | ( | const value_type | min_val, | |
| const value_type | max_val | |||
| ) | [inline] |
| max_val | Normalize all the elements such as they are in the given range |
Definition at line 615 of file CMatrixViews.h.
| mrpt_autotype& mrpt::math::CMatrixColumnAccessor< MAT >::applyToAllElements | ( | value_type(*)(value_type) | function | ) | [inline] |
Applies a generic operation "T func(T val)" to all the elements.
Definition at line 615 of file CMatrixViews.h.
| iterator mrpt::math::CMatrixColumnAccessor< MAT >::begin | ( | ) | [inline] |
Definition at line 624 of file CMatrixViews.h.
| const_iterator mrpt::math::CMatrixColumnAccessor< MAT >::begin | ( | ) | const [inline] |
Definition at line 627 of file CMatrixViews.h.
| size_t mrpt::math::CMatrixColumnAccessor< MAT >::countCommonElements | ( | const CONTAINER2 & | b | ) | const [inline] |
Counts the number of elements that appear in both containers (comparison through the == operator).
It is assumed that no repeated elements appear within each of the containers.
Definition at line 615 of file CMatrixViews.h.
| size_t mrpt::math::CMatrixColumnAccessor< MAT >::countNonZero | ( | ) | const [inline] |
Count how many elements in a container are non-zero.
Definition at line 615 of file CMatrixViews.h.
| CONTAINEROUT mrpt::math::CMatrixColumnAccessor< MAT >::cumsum | ( | ) | const [inline] |
Cumsum of all the elements, returning a container of the given type, for example: CMatrixDouble m = mat.cumsum<CMatrixDouble>();
Definition at line 615 of file CMatrixViews.h.
| void mrpt::math::CMatrixColumnAccessor< MAT >::cumsum | ( | CONTAINEROUT & | out | ) | const [inline] |
Cumsum of all the elements, saving in an output container
Definition at line 615 of file CMatrixViews.h.
| iterator mrpt::math::CMatrixColumnAccessor< MAT >::end | ( | ) | [inline] |
Definition at line 630 of file CMatrixViews.h.
References mrpt::math::CMatrixColumnAccessor< MAT >::m_mat.
| const_iterator mrpt::math::CMatrixColumnAccessor< MAT >::end | ( | ) | const [inline] |
Definition at line 633 of file CMatrixViews.h.
References mrpt::math::CMatrixColumnAccessor< MAT >::m_mat.
| mrpt_autotype& mrpt::math::CMatrixColumnAccessor< MAT >::Exp | ( | ) | [inline] |
Definition at line 615 of file CMatrixViews.h.
| void mrpt::math::CMatrixColumnAccessor< MAT >::fill | ( | const value_type & | val | ) | [inline] |
Fill all the elements with a given value
Definition at line 615 of file CMatrixViews.h.
| std::vector<double> mrpt::math::CMatrixColumnAccessor< MAT >::histogram | ( | double | limit_min, | |
| double | limit_max, | |||
| size_t | number_bins, | |||
| bool | do_normalization = false | |||
| ) | const [inline] |
Computes the normalized or normal histogram of a sequence of numbers given the number of bins and the limits.
In any case this is a "linear" histogram, i.e. for matrices, all the elements are taken as if they were a plain sequence, not taking into account they were in columns or rows.
Definition at line 615 of file CMatrixViews.h.
| mrpt_autotype& mrpt::math::CMatrixColumnAccessor< MAT >::Log | ( | ) | [inline] |
Definition at line 615 of file CMatrixViews.h.
| value_type mrpt::math::CMatrixColumnAccessor< MAT >::maximum | ( | size_t * | maxIndex = NULL |
) | const [inline] |
Finds the maximum value (and the corresponding zero-based index).
Definition at line 615 of file CMatrixViews.h.
| value_type mrpt::math::CMatrixColumnAccessor< MAT >::mean | ( | ) | const [inline] |
Return the mean of the container (for matrices, as if it were a vector with all its elements).
Definition at line 615 of file CMatrixViews.h.
| void mrpt::math::CMatrixColumnAccessor< MAT >::meanAndStd | ( | double & | out_mean, | |
| double & | out_std, | |||
| bool | unbiased = true | |||
| ) | [inline] |
Return the mean and standard deviation of all the elements in the container.
Definition at line 615 of file CMatrixViews.h.
| value_type mrpt::math::CMatrixColumnAccessor< MAT >::minimum | ( | size_t * | minIndex = NULL |
) | const [inline] |
Finds the minimum value (and the corresponding zero-based index).
Definition at line 615 of file CMatrixViews.h.
| void mrpt::math::CMatrixColumnAccessor< MAT >::minimum_maximum | ( | value_type & | out_min, | |
| value_type & | out_max, | |||
| size_t * | minIndex = NULL, |
|||
| size_t * | maxIndex = NULL | |||
| ) | const [inline] |
Minimum and maximum of a vector at once
Definition at line 615 of file CMatrixViews.h.
| value_type mrpt::math::CMatrixColumnAccessor< MAT >::norm | ( | ) | const [inline] |
Return the norm of the container (for matrices, as if it were a vector with all its elements).
Definition at line 615 of file CMatrixViews.h.
| value_type mrpt::math::CMatrixColumnAccessor< MAT >::norm_inf | ( | size_t * | maxIndex = NULL |
) | const [inline] |
Compute the norm-infinite of a vector ($f[ ||{v}||_ $f]), ie the maximum absolute value of the elements.
Definition at line 615 of file CMatrixViews.h.
| void mrpt::math::CMatrixColumnAccessor< MAT >::normalize | ( | const value_type | min_val = 0, |
|
| const value_type | max_val = 1 | |||
| ) | [inline] |
| max_val | Normalize all the elements such as they are in the given range |
Definition at line 615 of file CMatrixViews.h.
| value_type& mrpt::math::CMatrixColumnAccessor< MAT >::operator[] | ( | const size_t | i | ) | [inline] |
Definition at line 618 of file CMatrixViews.h.
References mrpt::math::CMatrixColumnAccessor< MAT >::m_colInd, and mrpt::math::CMatrixColumnAccessor< MAT >::m_mat.
| value_type mrpt::math::CMatrixColumnAccessor< MAT >::operator[] | ( | const size_t | i | ) | const [inline] |
Definition at line 619 of file CMatrixViews.h.
References mrpt::math::CMatrixColumnAccessor< MAT >::m_colInd, and mrpt::math::CMatrixColumnAccessor< MAT >::m_mat.
| reverse_iterator mrpt::math::CMatrixColumnAccessor< MAT >::rbegin | ( | ) | [inline] |
Definition at line 636 of file CMatrixViews.h.
References mrpt::math::CMatrixColumnAccessor< MAT >::m_mat.
| const_reverse_iterator mrpt::math::CMatrixColumnAccessor< MAT >::rbegin | ( | ) | const [inline] |
Definition at line 639 of file CMatrixViews.h.
References mrpt::math::CMatrixColumnAccessor< MAT >::m_mat.
| reverse_iterator mrpt::math::CMatrixColumnAccessor< MAT >::rend | ( | ) | [inline] |
Definition at line 642 of file CMatrixViews.h.
| const_reverse_iterator mrpt::math::CMatrixColumnAccessor< MAT >::rend | ( | ) | const [inline] |
Definition at line 645 of file CMatrixViews.h.
| void mrpt::math::CMatrixColumnAccessor< MAT >::resize | ( | size_t | N | ) | [inline] |
Definition at line 651 of file CMatrixViews.h.
References mrpt::math::CMatrixColumnAccessor< MAT >::size().
| size_t mrpt::math::CMatrixColumnAccessor< MAT >::size | ( | ) | const [inline] |
Definition at line 648 of file CMatrixViews.h.
References mrpt::math::CMatrixColumnAccessor< MAT >::m_mat.
Referenced by mrpt::math::CConstMatrixRowAccessorExtended< MAT >::resize(), mrpt::math::CConstMatrixRowAccessor< MAT >::resize(), mrpt::math::CMatrixRowAccessorExtended< MAT >::resize(), mrpt::math::CMatrixRowAccessor< MAT >::resize(), mrpt::math::CConstMatrixColumnAccessorExtended< MAT >::resize(), mrpt::math::CConstMatrixColumnAccessor< MAT >::resize(), mrpt::math::CMatrixColumnAccessorExtended< MAT >::resize(), and mrpt::math::CMatrixColumnAccessor< MAT >::resize().
| mrpt_autotype& mrpt::math::CMatrixColumnAccessor< MAT >::Sqrt | ( | ) | [inline] |
Definition at line 615 of file CMatrixViews.h.
| mrpt_autotype& mrpt::math::CMatrixColumnAccessor< MAT >::Square | ( | ) | [inline] |
Definition at line 615 of file CMatrixViews.h.
| value_type mrpt::math::CMatrixColumnAccessor< MAT >::squareNorm | ( | ) | const [inline] |
Return the square norm of the container (for matrices, as if it were a vector with all its elements).
Definition at line 615 of file CMatrixViews.h.
| double mrpt::math::CMatrixColumnAccessor< MAT >::std | ( | bool | unbiased = true |
) | const [inline] |
Return the standard deviation of all the elements in the container.
Definition at line 615 of file CMatrixViews.h.
| value_type mrpt::math::CMatrixColumnAccessor< MAT >::sumAll | ( | ) | const [inline] |
Sum all the elements
Definition at line 615 of file CMatrixViews.h.
size_t mrpt::math::CMatrixColumnAccessor< MAT >::m_colInd [protected] |
Definition at line 609 of file CMatrixViews.h.
Referenced by mrpt::math::CConstMatrixColumnAccessorExtended< MAT >::operator[](), mrpt::math::CConstMatrixColumnAccessor< MAT >::operator[](), mrpt::math::CMatrixColumnAccessorExtended< MAT >::operator[](), and mrpt::math::CMatrixColumnAccessor< MAT >::operator[]().
MAT* mrpt::math::CMatrixColumnAccessor< MAT >::m_mat [protected] |
Definition at line 608 of file CMatrixViews.h.
Referenced by mrpt::math::CConstMatrixRowAccessor< MAT >::end(), mrpt::math::CMatrixRowAccessor< MAT >::end(), mrpt::math::CConstMatrixColumnAccessor< MAT >::end(), mrpt::math::CMatrixColumnAccessor< MAT >::end(), mrpt::math::CConstMatrixRowAccessorExtended< MAT >::operator[](), mrpt::math::CConstMatrixRowAccessor< MAT >::operator[](), mrpt::math::CMatrixRowAccessorExtended< MAT >::operator[](), mrpt::math::CMatrixRowAccessor< MAT >::operator[](), mrpt::math::CConstMatrixColumnAccessorExtended< MAT >::operator[](), mrpt::math::CConstMatrixColumnAccessor< MAT >::operator[](), mrpt::math::CMatrixColumnAccessorExtended< MAT >::operator[](), mrpt::math::CMatrixColumnAccessor< MAT >::operator[](), mrpt::math::CConstMatrixRowAccessor< MAT >::rbegin(), mrpt::math::CMatrixRowAccessor< MAT >::rbegin(), mrpt::math::CConstMatrixColumnAccessor< MAT >::rbegin(), mrpt::math::CMatrixColumnAccessor< MAT >::rbegin(), mrpt::math::CConstMatrixRowAccessor< MAT >::size(), mrpt::math::CMatrixRowAccessor< MAT >::size(), mrpt::math::CConstMatrixColumnAccessor< MAT >::size(), and mrpt::math::CMatrixColumnAccessor< MAT >::size().
| Page generated by Doxygen 1.7.1 for MRPT 0.8.1 SVN:exported at Sun Sep 19 14:53:45 UTC 2010 |