-
Notifications
You must be signed in to change notification settings - Fork 5
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
Easier syntax for constructor #37
Comments
|
This would be a welcome improvement. I suggest using
I don't think As for the constructor syntax, is
possible? This is quite similar to StaticArrays: |
IIRC there was some problem with using colon there but I may be wrong. I'll try that soon. |
OK, now I see what the problem is: |
Just like
StaticArrays.jl
has the niceSA[...]
constructor, it should be possible to implement some easier-to-typeHybridArray
constructors. My suggestions would be a functionHybridArray(n1,n2,...)
which returns the type given by the arguments: either static if argument is anInteger
, or dynamic otherwise (with another suggestion being to use either-
or:
as a shortcut for dynamic dimension). For example,HybridArray(2,:)
would be a simpler alias forHybridArray{Tuple{2,StaticArrays.Dynamic()}}
. (this is probably quite simple to code).Another possibility which comes to mind would be to use cartesian product, so that, say,
Vector*SVector{3}
is computed asHybridArray{Tuple{StaticArrays.Dynamic(),3}}
.The text was updated successfully, but these errors were encountered: