lsst.gauss2d.fit g199a45376c+3b7b3fd841
 
Loading...
Searching...
No Matches
prior.h
1#ifndef LSST_GAUSS2D_FIT_PRIOR_H
2#define LSST_GAUSS2D_FIT_PRIOR_H
3
4#include <map>
5
6#include "lsst/gauss2d/object.h"
7
8#include "math.h"
9#include "param_defs.h"
10
11namespace lsst::gauss2d::fit {
12
16class PriorEvaluation : public Object {
17public:
18 typedef std::map<ParamBaseCRef, std::vector<double>> Jacobians;
19
20 double loglike;
21 std::vector<double> residuals;
22 Jacobians jacobians;
23
24 double compute_dloglike_dx(const ParamBase& param, bool transformed = true) const;
25
26 std::string repr(bool name_keywords = false,
27 std::string_view namespace_separator = Object::CC_NAMESPACE_SEPARATOR) const override;
28 std::string str() const override;
29
30 PriorEvaluation(double loglike, std::vector<double> residuals = {}, Jacobians jacobians = {},
31 bool check_size = true);
32 ~PriorEvaluation();
33};
34
38class Prior : public Object {
39public:
41 virtual std::vector<double> get_loglike_const_terms() const = 0;
49 virtual PriorEvaluation evaluate(bool calc_jacobians = false, bool normalize_loglike = true) const = 0;
50
51 virtual size_t size() const = 0;
52
53 virtual ~Prior() = default;
54};
55} // namespace lsst::gauss2d::fit
56
57#endif
Definition prior.h:38
virtual PriorEvaluation evaluate(bool calc_jacobians=false, bool normalize_loglike=true) const =0
virtual std::vector< double > get_loglike_const_terms() const =0
Return the constant terms of the log likelihood (dependent on stddevs only)