STIR  6.2.0
linear_regression.h
Go to the documentation of this file.
1 //
2 //
15 /*
16  Copyright (C) 2000- 2011, Hammersmith Imanet Ltd
17  This file is part of STIR.
18 
19  SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
20 
21  See STIR/LICENSE.txt for details
22 */
23 #ifndef __linear_regression_h__
24 #define __linear_regression_h__
25 
26 #include "stir/VectorWithOffset.h"
27 
28 START_NAMESPACE_STIR
29 
71 template <class Value, class DataType, class CoordinatesType>
72 inline void linear_regression(Value& constant,
73  Value& scale,
74  Value& chi_square,
75  Value& variance_of_constant,
76  Value& variance_of_scale,
77  Value& covariance_of_constant_with_scale,
78  const VectorWithOffset<DataType>& measured_data,
79  const VectorWithOffset<CoordinatesType>& coordinates,
80  const VectorWithOffset<float>& weights,
81  const bool use_estimated_variance = true);
82 
104 template <class Value, class DataIter, class CoordinatesIter, class WeightsIter>
105 inline void linear_regression(Value& constant,
106  Value& scale,
107  Value& chi_square,
108  Value& variance_of_constant,
109  Value& variance_of_scale,
110  Value& covariance_of_constant_with_scale,
111  DataIter measured_data_begin,
112  DataIter measured_data_end,
113  CoordinatesIter coords_begin,
114  WeightsIter weights_begin,
115  const bool use_estimated_variance = true);
116 
117 template <class ValueIter, class DataIter, class CoordinatesIter, class WeightsIter>
118 inline void linear_regression(ValueIter regression_values_begin,
119  DataIter data_begin,
120  DataIter data_end,
121  CoordinatesIter coords_begin,
122  WeightsIter weights_begin,
123  const bool use_estimated_variance = true);
124 
125 END_NAMESPACE_STIR
126 
128 
129 #endif // __linear_regression_h__
Implementation of inline functions for stir::linear_regression()
void linear_regression(Value &constant, Value &scale, Value &chi_square, Value &variance_of_constant, Value &variance_of_scale, Value &covariance_of_constant_with_scale, const VectorWithOffset< DataType > &measured_data, const VectorWithOffset< CoordinatesType > &coordinates, const VectorWithOffset< float > &weights, const bool use_estimated_variance=true)
Implements standard linear regression on VectorWithOffset data.
Definition: linear_regression.inl:161
defines the stir::VectorWithOffset class