8 #ifndef IMPISD_GAUSSIAN_PROCESS_INTERPOLATION_RESTRAINT_SPARSE_H
9 #define IMPISD_GAUSSIAN_PROCESS_INTERPOLATION_RESTRAINT_SPARSE_H
11 #include <IMP/isd/isd_config.h>
13 #ifdef IMP_ISD_USE_CHOLMOD
16 #include <boost/scoped_ptr.hpp>
22 #include <IMP/internal/OwnerPointer.h>
23 #include <Eigen/Dense>
24 #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
25 #include <Eigen/Sparse>
26 #include <unsupported/Eigen/CholmodSupport>
27 #include <ufsparse/cholmod.h>
31 IMPISD_BEGIN_NAMESPACE
33 using Eigen::SparseMatrix;
34 using Eigen::MatrixXd;
35 using Eigen::VectorXd;
43 class IMPISDEXPORT GaussianProcessInterpolationRestraintSparse
48 void update_mean_and_covariance();
51 IMP::Pointer<GaussianProcessInterpolationSparse> gpi_;
52 IMP::internal::OwnerPointer<MultivariateFNormalSufficientSparse> mvn_;
63 GaussianProcessInterpolationRestraintSparse(
64 GaussianProcessInterpolationSparse *gpi);
66 double get_probability()
const
68 const_cast<GaussianProcessInterpolationRestraintSparse*
>(
this)->
69 update_mean_and_covariance();
70 return mvn_->density();