-
Notifications
You must be signed in to change notification settings - Fork 19
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
Replace Vec<Vec<T>>
with a native Matrix representation
#274
Comments
A crate worth considering is the imho excellent ndarray. |
Note: The validation of the matrix is currently done here: air-script/ir/src/symbol_table/mod.rs Lines 57 to 63 in 46586ea
Is the idea to Edit: I think it makes sense to have a separate type that performs validation in the constructor, it doesn't have to replace the structure I linked in the original issue, but having a type with these properties validated makes easier to audit (since one doesn't have to find were / if the validation is done). |
We tried to keep validation out of the grammar in many cases in general to avoid making the grammar unnecessarily complex, but I agree with you that in this case it probably makes sense to do the validation in the constructor at the parser level. |
Thanks for the explanation, makes sense! How does the |
The idea behind |
Matrixes are currently represented with:
air-script/air-script-core/src/constant.rs
Line 41 in 0ed25aa
The representation above has two issues:
[[1], [2,3]]
One sketch proposal is:
Note: The above would be statically typed, another approach is to have a dynamic view of the data, like with pandas data frames.
The text was updated successfully, but these errors were encountered: