Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong euclidian distance #3

Open
Kaeseknacker opened this issue Jul 23, 2021 · 0 comments
Open

Wrong euclidian distance #3

Kaeseknacker opened this issue Jul 23, 2021 · 0 comments

Comments

@Kaeseknacker
Copy link

I think the euclidian distance is calculated wrong:

VectorXf res = distances.colwise().maxCoeff().transpose();

Eigen::VectorXf
NearNeighborDisMetric::_nneuclidean_distance(
        const FEATURESS &x, const FEATURESS &y)
{
    MatrixXf distances = _pdist(x,y);
    VectorXf res = distances.colwise().maxCoeff().transpose();
    res = res.array().max(VectorXf::Zero(res.rows()).array());
    return res;
}

should be:

Eigen::VectorXf res = distances.colwise().minCoeff().transpose();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant