Skip to content
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

Custom printing for Taylor1 #229

Merged
merged 2 commits into from Oct 21, 2019
Merged

Custom printing for Taylor1 #229

merged 2 commits into from Oct 21, 2019

Conversation

lbenet
Copy link
Member

@lbenet lbenet commented Oct 16, 2019

Fixes #211

... by adding a new global variable.

@dpsanders
Copy link
Contributor

So you can't do a Taylor1 of a Taylor1 with different variable names? It seems to me like we could just store the variable name inside the Taylor1 object.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 94.336% when pulling 3039fb0 on lb/iss211 into da84c93 on master.

@lbenet
Copy link
Member Author

lbenet commented Oct 16, 2019

Thanks for the remarks!

Indeed, you can't have different symbols which still makes those objects pretty confusing. There is some work on nested Taylor1s (see #126) though it has some problems; I have some (old) implementation which I haven't pushed, which would allow to distinguish those variables nicely. Perhaps I should also push that for evaluation.

I also thought about adding a fieldname in the struct as you propose. The question is what would we do when we have an operation (say addition) involving two Taylor1 objects with different display symbols? Independently of what the answer to that question will be, we would need to check the field of the displayed symbols, which would impact negatively the performance. (Perhaps, the solution is to promote the result to a Taylor1{Taylor1{T}} since we are actually talking about two distinct independent Taylor1 variables, but this is also debatable.)

So I simply decided not to get into those issues.

@lbenet
Copy link
Member Author

lbenet commented Oct 18, 2019

@dpsanders Do you agree to go ahead and merge this?

@lbenet
Copy link
Member Author

lbenet commented Oct 21, 2019

I'll go ahead and merge this.

@lbenet lbenet merged commit 530a438 into master Oct 21, 2019
@dpsanders
Copy link
Contributor

Sorry for the delay, thanks for merging!

@lbenet lbenet deleted the lb/iss211 branch February 12, 2020 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom printing for Taylor1
3 participants