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

Parametrization of distance function to allow for not-strictly-numeri… #288

Merged
merged 7 commits into from
Dec 28, 2022

Conversation

Cinereo2
Copy link
Collaborator

…cal optimization

Description

Distance function implemented as a parameter.

Linked issues

Resolves #287

}

impl FireflyAlgorithm {
fn new(
config: FireflyAlgorithmCfg,
brightness_function: fn(&Vec<f64>) -> f64,
probe: Box<dyn Probe>,
distance_function: fn(&Vec<f64>, &[f64]) -> f64,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
distance_function: fn(&Vec<f64>, &[f64]) -> f64,
distance_function: fn(&[f64], &[f64]) -> f64,

It is not necessary, but it its current form it's looking strange to me.

@Cinereo2 Cinereo2 merged commit e8de304 into main Dec 28, 2022
@Cinereo2 Cinereo2 deleted the ff-distance-refactor branch December 28, 2022 18:52
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

Successfully merging this pull request may close these issues.

[FF] Parametrization of distance function
2 participants