23 #ifndef __linear_regression_h__ 24 #define __linear_regression_h__ 71 template <
class Value,
class DataType,
class CoordinatesType>
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);
104 template <
class Value,
class DataIter,
class CoordinatesIter,
class WeightsIter>
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);
117 template <
class ValueIter,
class DataIter,
class CoordinatesIter,
class WeightsIter>
121 CoordinatesIter coords_begin,
122 WeightsIter weights_begin,
123 const bool use_estimated_variance =
true);
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