STIR  6.2.0
linear_extrapolation.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2005- 2009, Hammersmith Imanet Ltd
5  This file is part of STIR.
6 
7  SPDX-License-Identifier: Apache-2.0
8 
9  See STIR/LICENSE.txt for details
10 */
20 #include "stir/common.h"
21 START_NAMESPACE_STIR
22 
23 template <typename in_elemT>
24 inline void
25 linear_extrapolation(std::vector<in_elemT>& input_vector)
26 {
27  input_vector.push_back(*(input_vector.end() - 1) * 2 - *(input_vector.end() - 2));
28  input_vector.insert(input_vector.begin(), *input_vector.begin() * 2 - *(input_vector.begin() + 1));
29 }
30 
31 END_NAMESPACE_STIR
basic configuration include file