Commit 83bbccf1 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

rms function added

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1484
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent a435e406
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: innerproduct.h,v 1.2 2004-02-07 22:13:12 tforb Exp $
* $Id: innerproduct.h,v 1.3 2004-02-10 15:38:29 tforb Exp $
* \author Thomas Forbriger
* \date 07/02/2004
*
......@@ -23,7 +23,7 @@
#define TF_INNERPRODUCT_H_VERSION \
"TF_INNERPRODUCT_H V1.0 "
#define TF_INNERPRODUCT_H_CVSID \
"$Id: innerproduct.h,v 1.2 2004-02-07 22:13:12 tforb Exp $"
"$Id: innerproduct.h,v 1.3 2004-02-10 15:38:29 tforb Exp $"
#include<aff/series.h>
......@@ -47,6 +47,11 @@ namespace ts {
return(retval);
} // innerproduct
//! calculate rms value
template<class T>
T rms(const aff::ConstSeries<T>& a)
{ return(sqrt(innerproduct(a,a)/a.size())); }
} // namespace ts
#endif // TF_INNERPRODUCT_H_VERSION (includeguard)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment