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 fac! macro for factor construction #19

Merged
merged 3 commits into from
Dec 6, 2024
Merged

Add fac! macro for factor construction #19

merged 3 commits into from
Dec 6, 2024

Conversation

contagon
Copy link
Collaborator

@contagon contagon commented Dec 6, 2024

Following my new-found love for proc-macros, this adds the fac! macro for easy factor creation. Essentially this,

let factor = FactorBuilder::new2(res, X(0), X(1))
    .noise(noise)
    .robust(robust)
    .build();

Now becomes this,

factor = fac![res, (X(0), X(1)), noise, robust];

but still retains the symbol type checking, residual input # checking, and residual output/noise dimension checking.

@contagon contagon merged commit 3bbc373 into dev Dec 6, 2024
@contagon contagon deleted the easton/fac branch December 7, 2024 03:49
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.

1 participant