-
Notifications
You must be signed in to change notification settings - Fork 85
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 constructors with nu, ny, nx for easy rebuilding #399
Comments
I think that these fields were added as a convenience back in the day when one could not overload getproperty. I think it would be safe to add them to getproperty and remove the fields? @mfalt can you see any reason to keep them around, other than the nice way of accessing the sizes? |
I absolutely agree, I have been thinking this a couple of times as well |
* Solve #399 * temp. deactivate test that fails on v1.5 only * temp. deactivate test that fails on v1.5 only
This should be solved for statespace types now since we removed the internal fields that were no longer required. Might still be a problem for transfer functions though. |
Some useful functions that need to recurse through arbitrarily nested
struct
s and rebuild them with different values--like@set
and@set!
from Setfield.jl orreplace_particles
(along with its derived functionsmean_object
andnominal
) from MonteCarloMeasurements.jl--require constructors that match the positions of the type's fields. SinceTransferFunction
andStateSpace
have fields for their number of inputs/outputs[/states], but no constructors that take them in, it creates problems for these types of functions. For example, these don't currently work:but adding
makes it so they work:
This and the similar method for
TransferFunction
, are all that's needed for these types of functions to work. I can make a pull request with these, if it would be useful.The text was updated successfully, but these errors were encountered: