Commit 84ff4e76 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: 1845
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 0132d0ab
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: filter.cc,v 1.11 2005-07-11 14:56:40 tforb Exp $
* $Id: filter.cc,v 1.12 2005-07-11 16:17:00 tforb Exp $
* \author Thomas Forbriger
* \date 05/07/2005
*
......@@ -13,14 +13,16 @@
*
* REVISIONS and CHANGES
* - 05/07/2005 V1.0 Thomas Forbriger
* - 11/07/2005 V1.1 provide usage information
* - 11/07/2005 V1.1
* - provide usage information
* - correction in rev-code
*
* ============================================================================
*/
#define TF_FILTER_CC_VERSION \
"TF_FILTER_CC V1.1"
#define TF_FILTER_CC_CVSID \
"$Id: filter.cc,v 1.11 2005-07-11 14:56:40 tforb Exp $"
"$Id: filter.cc,v 1.12 2005-07-11 16:17:00 tforb Exp $"
#include <cmath>
#include <sstream>
......@@ -138,12 +140,17 @@ namespace ts {
//! reverse time series
Ttimeseries Reverse::operator()(const Ttimeseries& s) const
{
// std::cerr << "entering reverse" << std::endl;
Tindex k=s.f();
Tindex l=s.l();
while ((k<=s.l()) && (l>=s.f()))
Tindex ek=(k+l)/2+1;
Tindex el=(k+l)/2-1;
while ((k<ek) && (l>el))
{
Tvalue vk=s(k);
Tvalue vl=s(l);
// std::cerr << " # k" << k << " l" << l;
// std::cerr << " vk" << vk << " vl" << vl;
s(k)=vl;
s(l)=vk;
++k;
......
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