// 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)); } }
// 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)); } }