Go to the documentation of this file. 1 #ifndef HOPS_UNIFORMBALLKERNEL_HPP
2 #define HOPS_UNIFORMBALLKERNEL_HPP
7 template<
typename MatrixType,
typename VectorType>
17 for (
long i = 0; i < x.rows(); ++i) {
18 for (
long j = 0; j < y.rows(); ++j) {
19 VectorType diff = (x.row(i) - y.row(j)).transpose();
20 double distance = std::sqrt(diff.transpose() * diff);
21 covariance(i, j) =
static_cast<double>(distance <=
length);
31 #endif // HOPS_UNIFORMBALLKERNEL_HPP
Eigen::MatrixXd MatrixType
Definition: MatrixType.hpp:7
Definition: CsvReader.hpp:8
Eigen::VectorXd VectorType
Definition: VectorType.hpp:7