-
Notifications
You must be signed in to change notification settings - Fork 0
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
Allow VectorSource to take an N-vector #523
Comments
@clalancette One question and one thought. Why would you add that map from strings to indices? A |
I think @stonier was thinking to address the scenario where the VectorSource is this (i.e. a vector of related N-elements). With the current VectorSource, we can only do a 1-vector, so this is just an expansion of that. The map of string -> elements was basically to put some easy syntactic sugar on it. Does that make sense? |
Hmm I'm trying to imagine the use cases. Say your vector setting is a force. Does something like |
I had two thoughts here: Naming
Convenience If making a system that truly is a vector source, provide the user some syntactic sugar so that any code they write is easily readable, e.g. |
I agree on naming, though if we extend it I don't see a point in keeping a scalar version. On convenience, that's exactly the potential use case I had imagined and the one I'm not very fond of. One can use a vector as problem domain entity or as a collection of those. String indexes make a lot of sense when dealing with the latter, e.g. in system states, but are redundant (except as coordinate tags) in the former case. And in that context, I believe system diagrams will be cleaner if we avoid aggregating things like that and rely on having separate ports instead. |
When we added in the VectorSource (#502), it could only output a 1-vector. However, it should be more generic than that and we should be able to make it an N-vector. A relatively straightforward way to do this is:
The text was updated successfully, but these errors were encountered: