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

Cmst_from_complete: specialised Euclidean/EuclideanSquared version with BLAS #89

Open
gagolews opened this issue Nov 20, 2024 · 0 comments

Comments

@gagolews
Copy link
Owner

    // TODO: Cmst_from_complete:
/ / optimise distance computation for the Euclidean and EuclideanSquared distances
    // cache sum(x_i^2) in a vector d
    // note that sum((x_i-x_j)^2) = sum(x_i^2) - 2*sum(x_i*x_j) + sum(x_j^2)
    //                            = -2 * t(x_j)*x_i + 1 * d[j] + d[i]
    // d[i] = const in each iter
    // BLAS GEMV can be used in the remaining part
    // store a copy of X, swap rows after selecting the min to keep data
    //    contiguous + keep the permutation vector
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