Updated interface of TransferFunction #54
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The old interface of overloading getindex to use for both index access to the underlying data and frequency interpolation could lead to unwanted results, since the datatype of the passed index determined the mode.
I changed to interface to ensure that getindex will only access the underlying data and will not perform interpolation. For the frequency interpolation I made each TransferFunction object callable, similar to the access of the AbstractInterpolation object.
The new interface would look like this:
This change will break some code that uses the current implementation, but I added a descriptive warning, when the getindex method fails.