STIR 6.4.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*/
19
20#include "stir/common.h"
21START_NAMESPACE_STIR
22
23template <typename in_elemT>
24inline void
25linear_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
31END_NAMESPACE_STIR
basic configuration include file