Main MRPT website > C++ reference
MRPT logo

mrpt::math::CMatrixColumnAccessorExtended< MAT > Class Template Reference

A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator, with offset and custom spacing. More...

#include <mrpt/math/CMatrixViews.h>

List of all members.

Classes

struct  mrpt_container

Public Types

typedef MAT::value_type value_type
typedef
CMatrixColumnAccessorExtended
< MAT > 
mrpt_autotype

Protected Attributes

MAT * m_mat
size_t m_colInd
size_t m_rowOffset
size_t m_elementsSpace
size_t howMany

Methods common to all containers



typedef
detail::AccessorIterator
< CMatrixColumnAccessorExtended
< MAT >, value_type > 
iterator
typedef
detail::AccessorIterator
< const
CMatrixColumnAccessorExtended
< MAT >, const value_type > 
const_iterator
typedef
detail::ReverseAccessorIterator
< CMatrixColumnAccessorExtended
< MAT >, value_type > 
reverse_iterator
typedef
detail::ReverseAccessorIterator
< const
CMatrixColumnAccessorExtended
< MAT >, const value_type > 
const_reverse_iterator
size_t countNonZero () const
void fill (const mrpt_autotype &val)
mrpt_autotype maximum (size_t *maxIndex=NULL) const
mrpt_autotype minimum (size_t *minIndex=NULL) const
void minimum_maximum (mrpt_autotype &out_min, mrpt_autotype &out_max, size_t *minIndex=NULL, size_t *maxIndex=NULL) const
mrpt_autotype norm_inf (size_t *maxIndex=NULL) const
mrpt_autotype sumAll () const
template<typename RET_TYPE >
RET_TYPE sumAllRetType () 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
std::vector< double > histogram (double limit_min, double limit_max, size_t number_bins, bool do_normalization=false) const
template<class F >
mrpt_autotype & applyToAllElements (mrpt_autotype(*function)(mrpt_autotype))
mrpt_autotype & Sqrt ()
mrpt_autotype & Abs ()
mrpt_autotype & Square ()
mrpt_autotype & Exp ()
mrpt_autotype & Log ()
mrpt_autotype squareNorm () const
mrpt_autotype norm () const
double mean () const
void adjustRange (const mrpt_autotype min_val, const mrpt_autotype max_val)
void normalize (const mrpt_autotype min_val=0, const mrpt_autotype max_val=1)
double std (bool unbiased=true) const
void meanAndStd (double &out_mean, double &out_std, bool unbiased=true)
 CMatrixColumnAccessorExtended (MAT &mat, size_t col, size_t offset, size_t space)
 CMatrixColumnAccessorExtended ()
value_type & operator[] (size_t i)
value_type operator[] (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)

Detailed Description

template<typename MAT>
class mrpt::math::CMatrixColumnAccessorExtended< MAT >

A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator, with offset and custom spacing.

See also:
CMatrixRowAccessorExtended,CMatrixColumnAccessor,CConstMatrixColumnAccessor,CConstMatrixColumnAccessorExtended

Definition at line 722 of file CMatrixViews.h.


Member Typedef Documentation

Definition at line 747 of file CMatrixViews.h.

Definition at line 749 of file CMatrixViews.h.

Definition at line 746 of file CMatrixViews.h.

Definition at line 731 of file CMatrixViews.h.

Definition at line 748 of file CMatrixViews.h.

template<typename MAT>
typedef MAT::value_type mrpt::math::CMatrixColumnAccessorExtended< MAT >::value_type

Definition at line 730 of file CMatrixViews.h.


Constructor & Destructor Documentation

template<typename MAT>
mrpt::math::CMatrixColumnAccessorExtended< MAT >::CMatrixColumnAccessorExtended ( MAT &  mat,
size_t  col,
size_t  offset,
size_t  space 
) [inline]

Definition at line 735 of file CMatrixViews.h.

References ASSERT_.

template<typename MAT>
mrpt::math::CMatrixColumnAccessorExtended< MAT >::CMatrixColumnAccessorExtended (  )  [inline]

Definition at line 739 of file CMatrixViews.h.


Member Function Documentation

template<typename MAT>
mrpt_autotype& mrpt::math::CMatrixColumnAccessorExtended< MAT >::Abs (  )  [inline]

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
void mrpt::math::CMatrixColumnAccessorExtended< MAT >::adjustRange ( const mrpt_autotype  min_val,
const mrpt_autotype  max_val 
) [inline]
Parameters:
max_val Normalize all the elements such as they are in the given range

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
template<class F >
mrpt_autotype& mrpt::math::CMatrixColumnAccessorExtended< MAT >::applyToAllElements ( mrpt_autotype(*)(mrpt_autotype)  function  )  [inline]

Applies a generic operation "T func(T val)" to all the elements.

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
const_iterator mrpt::math::CMatrixColumnAccessorExtended< MAT >::begin (  )  const [inline]

Definition at line 753 of file CMatrixViews.h.

template<typename MAT>
iterator mrpt::math::CMatrixColumnAccessorExtended< MAT >::begin (  )  [inline]

Definition at line 750 of file CMatrixViews.h.

template<typename MAT>
template<class CONTAINER2 >
size_t mrpt::math::CMatrixColumnAccessorExtended< MAT >::countCommonElements ( const CONTAINER2 &  b  )  const [inline]

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
size_t mrpt::math::CMatrixColumnAccessorExtended< MAT >::countNonZero (  )  const [inline]

Count how many elements in a container are non-zero.

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
template<class CONTAINEROUT >
CONTAINEROUT mrpt::math::CMatrixColumnAccessorExtended< 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 734 of file CMatrixViews.h.

template<typename MAT>
template<class CONTAINEROUT >
void mrpt::math::CMatrixColumnAccessorExtended< MAT >::cumsum ( CONTAINEROUT &  out  )  const [inline]

Cumsum of all the elements, saving in an output container

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
const_iterator mrpt::math::CMatrixColumnAccessorExtended< MAT >::end (  )  const [inline]

Definition at line 759 of file CMatrixViews.h.

template<typename MAT>
iterator mrpt::math::CMatrixColumnAccessorExtended< MAT >::end (  )  [inline]

Definition at line 756 of file CMatrixViews.h.

template<typename MAT>
mrpt_autotype& mrpt::math::CMatrixColumnAccessorExtended< MAT >::Exp (  )  [inline]

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
void mrpt::math::CMatrixColumnAccessorExtended< MAT >::fill ( const mrpt_autotype &  val  )  [inline]

Fill all the elements with a given value

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
std::vector<double> mrpt::math::CMatrixColumnAccessorExtended< MAT >::histogram ( double  limit_min,
double  limit_max,
size_t  number_bins,
bool  do_normalization = false 
) const [inline]

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
mrpt_autotype& mrpt::math::CMatrixColumnAccessorExtended< MAT >::Log (  )  [inline]

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
mrpt_autotype mrpt::math::CMatrixColumnAccessorExtended< MAT >::maximum ( size_t *  maxIndex = NULL  )  const [inline]

Finds the maximum value (and the corresponding zero-based index).

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
double mrpt::math::CMatrixColumnAccessorExtended< 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 734 of file CMatrixViews.h.

template<typename MAT>
void mrpt::math::CMatrixColumnAccessorExtended< 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 734 of file CMatrixViews.h.

template<typename MAT>
mrpt_autotype mrpt::math::CMatrixColumnAccessorExtended< MAT >::minimum ( size_t *  minIndex = NULL  )  const [inline]

Finds the minimum value (and the corresponding zero-based index).

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
void mrpt::math::CMatrixColumnAccessorExtended< MAT >::minimum_maximum ( mrpt_autotype &  out_min,
mrpt_autotype &  out_max,
size_t *  minIndex = NULL,
size_t *  maxIndex = NULL 
) const [inline]

Minimum and maximum of a vector at once

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
mrpt_autotype mrpt::math::CMatrixColumnAccessorExtended< 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 734 of file CMatrixViews.h.

template<typename MAT>
mrpt_autotype mrpt::math::CMatrixColumnAccessorExtended< 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 734 of file CMatrixViews.h.

template<typename MAT>
void mrpt::math::CMatrixColumnAccessorExtended< MAT >::normalize ( const mrpt_autotype  min_val = 0,
const mrpt_autotype  max_val = 1 
) [inline]
Parameters:
max_val Normalize all the elements such as they are in the given range

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
value_type mrpt::math::CMatrixColumnAccessorExtended< MAT >::operator[] ( size_t  i  )  const [inline]
template<typename MAT>
value_type& mrpt::math::CMatrixColumnAccessorExtended< MAT >::operator[] ( size_t  i  )  [inline]
template<typename MAT>
const_reverse_iterator mrpt::math::CMatrixColumnAccessorExtended< MAT >::rbegin (  )  const [inline]

Definition at line 765 of file CMatrixViews.h.

template<typename MAT>
reverse_iterator mrpt::math::CMatrixColumnAccessorExtended< MAT >::rbegin (  )  [inline]

Definition at line 762 of file CMatrixViews.h.

template<typename MAT>
const_reverse_iterator mrpt::math::CMatrixColumnAccessorExtended< MAT >::rend (  )  const [inline]

Definition at line 771 of file CMatrixViews.h.

template<typename MAT>
reverse_iterator mrpt::math::CMatrixColumnAccessorExtended< MAT >::rend (  )  [inline]

Definition at line 768 of file CMatrixViews.h.

template<typename MAT>
void mrpt::math::CMatrixColumnAccessorExtended< MAT >::resize ( size_t  N  )  [inline]

Definition at line 777 of file CMatrixViews.h.

References mrpt::math::CMatrixColumnAccessor< MAT >::size().

template<typename MAT>
size_t mrpt::math::CMatrixColumnAccessorExtended< MAT >::size (  )  const [inline]

Definition at line 774 of file CMatrixViews.h.

template<typename MAT>
mrpt_autotype& mrpt::math::CMatrixColumnAccessorExtended< MAT >::Sqrt (  )  [inline]

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
mrpt_autotype& mrpt::math::CMatrixColumnAccessorExtended< MAT >::Square (  )  [inline]

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
mrpt_autotype mrpt::math::CMatrixColumnAccessorExtended< 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 734 of file CMatrixViews.h.

template<typename MAT>
double mrpt::math::CMatrixColumnAccessorExtended< MAT >::std ( bool  unbiased = true  )  const [inline]

Return the standard deviation of all the elements in the container.

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
mrpt_autotype mrpt::math::CMatrixColumnAccessorExtended< MAT >::sumAll (  )  const [inline]

Sum all the elements, returning a value of the same type than the container

Definition at line 734 of file CMatrixViews.h.

template<typename MAT>
template<typename RET_TYPE >
RET_TYPE mrpt::math::CMatrixColumnAccessorExtended< MAT >::sumAllRetType (  )  const [inline]

Sum all the elements, returning a value of a custom type (this could be used to avoid overflow with containers of integers)

Definition at line 734 of file CMatrixViews.h.


Member Data Documentation

template<typename MAT>
size_t mrpt::math::CMatrixColumnAccessorExtended< MAT >::howMany [protected]

Definition at line 728 of file CMatrixViews.h.

template<typename MAT>
size_t mrpt::math::CMatrixColumnAccessorExtended< MAT >::m_colInd [protected]

Definition at line 725 of file CMatrixViews.h.

template<typename MAT>
size_t mrpt::math::CMatrixColumnAccessorExtended< MAT >::m_elementsSpace [protected]

Definition at line 727 of file CMatrixViews.h.

template<typename MAT>
MAT* mrpt::math::CMatrixColumnAccessorExtended< MAT >::m_mat [protected]

Definition at line 724 of file CMatrixViews.h.

template<typename MAT>
size_t mrpt::math::CMatrixColumnAccessorExtended< MAT >::m_rowOffset [protected]

Definition at line 726 of file CMatrixViews.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



Page generated by Doxygen 1.6.2-20100208 for MRPT 0.9.0 SVN: at Sun Jun 6 22:55:28 UTC 2010