7 Eigen::Ref<Eigen::MatrixXd> covBlock)
13 std::shared_ptr<KernelBase> kernel,
14 Eigen::Ref<Eigen::MatrixXd> covBlock)
20 std::shared_ptr<KernelBase> kernel,
21 Eigen::Ref<Eigen::MatrixXd> covBlock)
23 covBlock = otherObs->H->Apply(
H->Apply(
BuildBaseCovariance(otherObs, kernel) ).transpose() ).transpose();
27 std::shared_ptr<KernelBase> kernel)
29 return kernel->BuildCovariance(
loc, otherLoc);
34 return kernel->BuildCovariance(
loc,
loc);
38 std::shared_ptr<KernelBase> kernel)
41 auto derivObs = std::dynamic_pointer_cast<DerivativeObservation>(otherObs);
43 return derivObs->BuildBaseCovariance(shared_from_this(), kernel).transpose();
45 return kernel->BuildCovariance(
loc, otherObs->loc);
52 std::shared_ptr<KernelBase> kernel)
54 Eigen::MatrixXd output(
derivCoords.size() * kernel->coDim, kernel->coDim);
56 output.block(i*
derivCoords.size(),0,kernel->coDim,kernel->coDim) = kernel->GetPosDerivative(otherLoc,
loc,
derivCoords.at(i));
78 std::shared_ptr<KernelBase> kernel)
82 auto derivObs = std::dynamic_pointer_cast<DerivativeObservation>(otherObs);
85 Eigen::MatrixXd output(
derivCoords.size() * kernel->coDim, derivObs->derivCoords.size() * kernel->coDim);
88 for(
int j=0; j<derivObs->derivCoords.size(); ++j){
91 allWrts.insert(allWrts.end(), derivObs->derivCoords.at(j).begin(), derivObs->derivCoords.at(j).end());
92 output.block(i*
derivCoords.size(),j*derivObs->derivCoords.size(),kernel->coDim,kernel->coDim) = kernel->GetPosDerivative(
loc, otherObs->loc, allWrts);
virtual Eigen::MatrixXd BuildBaseCovariance(Eigen::Ref< const Eigen::VectorXd > const &otherObs, std::shared_ptr< KernelBase > kernel) override
std::vector< std::vector< int > > derivCoords