We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
CustomState
#[derive(CustomState)] pub struct MyCustomState(f64);
should implement CustomState and better_any::Tid (or an equivalent). It should also handle a single lifetime and multiple generics correctly.
better_any::Tid
The text was updated successfully, but these errors were encountered:
A shortcut for exposing Component parameters would also be handy. Maybe something like this is possible with some proc-macro magic:
Component
Annotate component fields with some attribute, which generates a SomeComponentMutationRate(f64) custom state struct:
SomeComponentMutationRate(f64)
#[derive(ExposedParameter)] pub struct SomeComponent { #[expose(rename = "mutation_rate")] pub f64: rm, }
The struct can then be referred to in Component methods using some Param![] macro:
Param![]
fn execute(problem: &P, state: &mut State<P>) -> ExecResult<()> { let mutation_rate = state.get_value::<Param![SomeComponent::mutation_rate]>(); ... }
Maybe it's even possible to use Param![Self::mutation_rate] in SomeComponent.
Param![Self::mutation_rate]
SomeComponent
Sorry, something went wrong.
No branches or pull requests
should implement
CustomState
andbetter_any::Tid
(or an equivalent). It should also handle a single lifetime and multiple generics correctly.The text was updated successfully, but these errors were encountered: