8 #ifndef IMPISD_GAUSSIAN_PROCESS_INTERPOLATION_RESTRAINT_H
9 #define IMPISD_GAUSSIAN_PROCESS_INTERPOLATION_RESTRAINT_H
11 #include <IMP/isd/isd_config.h>
13 #include <boost/scoped_ptr.hpp>
17 #include <IMP/internal/OwnerPointer.h>
18 #include <Eigen/Dense>
19 #include <Eigen/Cholesky>
24 IMPISD_BEGIN_NAMESPACE
26 using Eigen::MatrixXd;
27 using Eigen::VectorXd;
28 using Eigen::RowVectorXd;
31 class GaussianProcessInterpolationScoreState;
42 void update_mean_and_covariance();
45 IMP::Pointer<GaussianProcessInterpolation> gpi_;
46 IMP::internal::OwnerPointer<MultivariateFNormalSufficient> mvn_;
47 IMP::internal::OwnerPointer<GaussianProcessInterpolationScoreState> ss_;
62 double get_probability()
const
64 return mvn_->density();
73 void set_use_cg(
bool use,
double tol) {mvn_->set_use_cg(use,tol);}
76 double get_minus_log_normalization()
const;
77 double get_minus_exponent()
const;
80 Eigen::MatrixXd get_hessian()
const;
83 double get_logdet_hessian()
const;
95 void set_model(
Model *m);
98 friend class GaussianProcessInterpolationScoreState;
101 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
102 class IMPISDEXPORT GaussianProcessInterpolationScoreState :
public ScoreState
105 IMP::WeakPointer<GaussianProcessInterpolationRestraint> gpir_;
108 GaussianProcessInterpolationScoreState(
113 friend class GaussianProcessInterpolationRestraint;