예제 #1
0
파일: util.cpp 프로젝트: mnievesc/eems
// Compute pairwise distances between the rows of X and the rows of Y.
// Choose either Euclidean or great circle distance
MatrixXd pairwise_distance(const MatrixXd &X, const MatrixXd &Y) {
  if (!dist_metric.compare("greatcirc")) {
    return (greatcirc_dist(X,Y));
  } else {
    return (euclidean_dist(X,Y));
  }
}
예제 #2
0
// Compute pairwise distances between the rows of X and the rows of Y.
// Choose either Euclidean or great circle distance
Eigen::MatrixXd pairwise_dist(const Eigen::MatrixXd &X, const Eigen::MatrixXd &Y, const std::string &distm) {
    if (!distm.compare("greatcirc")) {
        return (greatcirc_dist(X,Y));
    } else {
        return (euclidean_dist(X,Y));
    }
}