Commit 88feae57 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

correction

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: 1847
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 7837bbb4
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: filter.cc,v 1.12 2005-07-11 16:17:00 tforb Exp $
* $Id: filter.cc,v 1.13 2005-07-11 17:12:56 tforb Exp $
* \author Thomas Forbriger
* \date 05/07/2005
*
......@@ -15,14 +15,15 @@
* - 05/07/2005 V1.0 Thomas Forbriger
* - 11/07/2005 V1.1
* - provide usage information
* - correction in rev-code
* - correction in rev code
* - correction in fbl code
*
* ============================================================================
*/
#define TF_FILTER_CC_VERSION \
"TF_FILTER_CC V1.1"
#define TF_FILTER_CC_CVSID \
"$Id: filter.cc,v 1.12 2005-07-11 16:17:00 tforb Exp $"
"$Id: filter.cc,v 1.13 2005-07-11 17:12:56 tforb Exp $"
#include <cmath>
#include <sstream>
......@@ -125,10 +126,15 @@ namespace ts {
int n1= (Mn1 < 1) ? 1 : Mn1;
Tindex e1=s1+n1-1;
Tindex m1=(s1+e1)/2;
int n2= (Mn2 < 1) ? Mn1 : Mn2;
int n2= (Mn2 < 1) ? n1 : Mn2;
Tindex e2= (Mne < 1) ? s.l() : Mne;
Tindex s2= e2-n2+1;
Tindex m2=(s2+e2)/2;
/* DEBUG
std::cerr << "fbl: " << " n1 " << n1 << " n2 " << n2
<< " s1 " << s1 << " e1 " << e1 << " m1 " << m1
<< " s2 " << s2 << " e2 " << e2 << " m2 " << m2 << std::endl;
*/
Tvalue avg1=aff::func::avg<Tseries>(aff::subarray<Tseries>(s)(s1,e1));
Tvalue avg2=aff::func::avg<Tseries>(aff::subarray<Tseries>(s)(s2,e2));
double a=(avg2-avg1)/double(m2-m1);
......
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