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

Add behaviour measures #197

Merged
merged 28 commits into from
May 28, 2024
Merged

Add behaviour measures #197

merged 28 commits into from
May 28, 2024

Conversation

HeleNoir
Copy link
Collaborator

Added those behaviour measures which seem most important at the moment.

Possibly there are some (or rather many) improvements to be made to the way I implemented them, so please tell me what you think should be changed.

@HeleNoir HeleNoir requested a review from Saethox May 24, 2024 13:25
@luleyleo
Copy link
Collaborator

I think you'll have to update the Rust version for the CI to run:

RUST_VERSION: 1.70.0

Cargo.toml Show resolved Hide resolved

/// An archive for storing individuals between operators, e.g. for subsequent calculation of measures.
#[derive(Default, Tid)]
pub struct IntermediateArchive<P: Problem + 'static>(Vec<Individual<P>>);
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would maybe be nicer to add a Archive<I: Identifier> struct that is used by all archive components that require a Vec<Individual>, but I think this is fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can remember this for a later improvement PR.

@Saethox
Copy link
Collaborator

Saethox commented May 28, 2024

I think once it passes the CI, we're ready to merge.

@HeleNoir
Copy link
Collaborator Author

Could you please take a look at the last error in the CI (@Saethox)? I did not change anything there and I don't understand what's wrong.

@Saethox
Copy link
Collaborator

Saethox commented May 28, 2024

Could you please take a look at the last error in the CI (@Saethox)? I did not change anything there and I don't understand what's wrong.

Seems to be a clippy bug: rust-lang/rust-clippy#12788

Looks like we either need to downgrade our clippy version or remove the #[derive(Derivative)] in favor of a manual implementation of Clone and Copy.

@luleyleo
Copy link
Collaborator

Looks like we either need to downgrade our clippy version or remove the #[derive(Derivative)] in favor of a manual implementation of Clone and Copy.

We could also allow non_canonical_clone_impl for now.

@Saethox
Copy link
Collaborator

Saethox commented May 28, 2024

We could also allow non_canonical_clone_impl for now.

True, that's an easier option. Probably needs to be module-wide on utils.rs, I don't think #[allow()] works directly on the derive macro.

@HeleNoir HeleNoir merged commit 3a4ef1e into master May 28, 2024
4 checks passed
@HeleNoir HeleNoir deleted the add-behaviour-measures branch May 28, 2024 14:41
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.

3 participants