running_stat_vec_bones.hpp
Go to the documentation of this file.
1 // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)
2 // Copyright (C) 2009-2011 Conrad Sanderson
3 //
4 // This file is part of the Armadillo C++ library.
5 // It is provided without any warranty of fitness
6 // for any purpose. You can redistribute this file
7 // and/or modify it under the terms of the GNU
8 // Lesser General Public License (LGPL) as published
9 // by the Free Software Foundation, either version 3
10 // of the License or (at your option) any later version.
11 // (see http://www.opensource.org/licenses for more info)
12 
13 
16 
17 
18 
23 template<typename eT>
25  {
26  public:
27 
28  typedef typename get_pod_type<eT>::result T;
29 
30  inline ~running_stat_vec();
31  inline running_stat_vec(const bool in_calc_cov = false);
32 
33  inline running_stat_vec(const running_stat_vec& in_rsv);
34 
35  inline const running_stat_vec& operator=(const running_stat_vec& in_rsv);
36 
37  template<typename T1> arma_hot inline void operator() (const Base< T, T1>& X);
38  template<typename T1> arma_hot inline void operator() (const Base< std::complex<T>, T1>& X);
39 
40  inline void reset();
41 
42  inline const Mat<eT>& mean() const;
43 
44  inline const Mat< T>& var (const uword norm_type = 0);
45  inline Mat< T> stddev(const uword norm_type = 0) const;
46  inline const Mat<eT>& cov (const uword norm_type = 0);
47 
48  inline const Mat<eT>& min() const;
49  inline const Mat<eT>& max() const;
50 
51  inline T count() const;
52 
53  //
54  //
55 
56  private:
57 
58  const bool calc_cov;
59 
61 
65 
68 
71 
74 
77 
78  friend class running_stat_vec_aux;
79  };
80 
81 
82 
84  {
85  public:
86 
87  template<typename eT>
88  inline static void update_stats(running_stat_vec< eT >& x, const Mat<eT>& sample);
89 
90  template<typename T>
91  inline static void update_stats(running_stat_vec< std::complex<T> >& x, const Mat< T>& sample);
92 
93  template<typename T>
94  inline static void update_stats(running_stat_vec< std::complex<T> >& x, const Mat< std::complex<T> >& sample);
95 
96  //
97 
98  template<typename eT>
99  inline static Mat<eT> var(const running_stat_vec< eT >& x, const uword norm_type = 0);
100 
101  template<typename T>
102  inline static Mat< T> var(const running_stat_vec< std::complex<T> >& x, const uword norm_type = 0);
103 
104  //
105 
106  template<typename eT>
107  inline static Mat< eT > cov(const running_stat_vec< eT >& x, const uword norm_type = 0);
108 
109  template<typename T>
110  inline static Mat< std::complex<T> > cov(const running_stat_vec< std::complex<T> >& x, const uword norm_type = 0);
111  };
112 
113 
114 
T count() const
number of samples so far
const Mat< eT > & mean() const
mean or average value
arma_aligned Mat< eT > min_val
arma_aligned Mat< eT > r_cov
const Mat< eT > & min() const
vector with minimum values
arma_aligned arma_counter< T > counter
u32 uword
Definition: typedef.hpp:85
Mat< T > stddev(const uword norm_type=0) const
standard deviation
arma_aligned Mat< T > min_val_norm
arma_aligned Mat< eT > r_mean
arma_aligned Mat< T > max_val_norm
arma_aligned Mat< T > r_var
const Mat< T > & var(const uword norm_type=0)
variance
arma_aligned Mat< eT > tmp2
const Mat< eT > & max() const
vector with maximum values
running_stat_vec(const bool in_calc_cov=false)
#define arma_aligned
arma_aligned Mat< eT > max_val
get_pod_type< eT >::result T
Dense matrix class.
arma_aligned Mat< eT > tmp1
const Mat< eT > & cov(const uword norm_type=0)
covariance
const running_stat_vec & operator=(const running_stat_vec &in_rsv)
void reset()
set all statistics to zero
#define arma_hot
arma_aligned Mat< T > r_var_dummy
arma_hot void operator()(const Base< T, T1 > &X)
arma_aligned Mat< eT > r_cov_dummy


armadillo_matrix
Author(s):
autogenerated on Fri Apr 16 2021 02:31:58