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 matrix! macro for initialization of Matrix structs with array-like syntax #83

Open
chrissimpkins opened this issue Jan 15, 2022 · 1 comment · May be fixed by #68
Open

Add matrix! macro for initialization of Matrix structs with array-like syntax #83

chrissimpkins opened this issue Jan 15, 2022 · 1 comment · May be fixed by #68

Comments

@chrissimpkins
Copy link
Owner

chrissimpkins commented Jan 15, 2022

Add a matrix! macro that supports the following Matrix struct initialization idioms:

With row vectors that define each ordered scalar value

let m = matrix!(
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
);

With row vectors that use an array-like repetition pattern

The following will make a 3 x 5 Matrix filled with 1's.

let m = matrix!(
    [1; 5],
    [1; 5],
    [1; 5]
);

This macro will take row vectors only.

@chrissimpkins
Copy link
Owner Author

Added in #84

@chrissimpkins chrissimpkins linked a pull request Jan 27, 2022 that will close this issue
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 a pull request may close this issue.

1 participant